Skip to content

Fix dashboard pruned/full label: accept MONERO_PRUNE=1 (#32)#174

Merged
VijitSingh97 merged 1 commit into
mainfrom
fix/dashboard-prune-label
Jun 8, 2026
Merged

Fix dashboard pruned/full label: accept MONERO_PRUNE=1 (#32)#174
VijitSingh97 merged 1 commit into
mainfrom
fix/dashboard-prune-label

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

Problem

The dashboard's Monero Pruned/Full badge always showed Full on a local node, even when the node was correctly pruned.

config.py parsed the env var as:

MONERO_PRUNE = os.environ.get("MONERO_PRUNE", "true").strip().lower() == "true"

…but pithead renders config.json's monero.prune into .env as MONERO_PRUNE=1 (the numeric form monerod's CLI requires). "1" == "true" is False, so a correctly pruned node read as Full.

This is purely a display bug — the node prunes either way — but it's misleading (it confused a real deployment whose header read "XMR Full" despite prune-blockchain=1).

Fix

Accept the numeric/boolean truthy forms 1/true/yes/on (and the falsy 0/false/no/off/empty).

Tests

  • test_monero_prune_accepts_truthy_forms / test_monero_prune_accepts_falsy_forms in tests/config/test_config.py, covering case + whitespace variants.
  • Full dashboard suite green locally: 424 passed, 93% coverage (config.py 100%).

Scope

Standalone, general fix — independent of #114. It belongs in main so a clean deploy labels pruned nodes correctly.

Fixes #32.

🤖 Generated with Claude Code

The dashboard parsed MONERO_PRUNE with `== "true"`, but pithead renders
config.json's monero.prune as 1/0 (the form monerod's CLI wants), so a
correctly pruned local node always displayed "Full" — purely a display
bug (the node prunes either way), but misleading.

The parser now accepts 1/true/yes/on (and falsy 0/false/no/off/empty),
with unit tests covering both. Surfaced on a live pruned deployment whose
badge read "XMR Full" despite prune-blockchain=1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@VijitSingh97 VijitSingh97 merged commit e1cbed0 into main Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show pruned vs full status in the Monero panel

1 participant