AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 35 Bitcoin

json_db: fix StoredDict.__delitem__() to work similarly to .pop()

Public commit record

What the developer wrote

Authored by SomberNight

73/100 · Adequate
json_db: fix StoredDict.__delitem__() to work similarly to .pop()

follow-up https://github.com/spesmilo/electrum/pull/10233 ("jsondb pointers")
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a consistency bug in Electrum's internal JSON database. When a user or code deleted a nested dictionary using `del dict[key]`, the child dictionary was not properly told it had been removed from its parent. That meant changes made to the child after deletion could still leak into the wallet's pending database updates. The fix makes `del dict[key]` behave the same as `.pop(key)` by clearing the child's parent pointer. The included tests confirm both methods now behave identically.

Recommended action

Treat as a low-severity correctness fix. Review whether any wallet operations or plugins use `del` on StoredDict instances and could have produced stale patches; no immediate emergency response is indicated, but users should update to include this follow-up fix.

Security signals we found

01

Data-integrity bug in wallet storage layer

02

Inconsistent behavior between dict.pop() and del dict[key]

03

Potential for stale nested objects to emit unintended database patches

04

Follow-up to prior JSON DB pointer refactor (PR #10233)

Risk score

Why this scored 35/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 6/15
Affected reach 7/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.