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

commands: add back from_height/to_height params to onchain_history

Public commit record

What the developer wrote

Authored by SomberNight

81/100 · Strong
commands: add back from_height/to_height params to onchain_history

closes https://github.com/spesmilo/electrum/issues/10119

also:
- wallet.get_onchain_history was broken with from_height/to_height args
- "show_fees" param is and was non-existent. fees are always added to output
- MyEncoder(json.JSONEncoder) changed a bit:
- I am pretty sure cutting the last 3 chars was intended to cut off the seconds
- however that was making incorrect assumptions about what datetime.isoformat() returns
- which depends on whether microsecond precision is available or whether an explicit timezone is set
- this now makes it clear that we want minutes-resolution, but still leaves the timezone-ambiguity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit restores two command-line options, from_height and to_height, to Electrum's onchain_history command. It also fixes a small bug where the wallet's internal history filtering was reading the wrong variable for block height, and tightens how dates are formatted to JSON. There is no direct security vulnerability here; it is mostly a bug-fix and feature-restoration change.

Recommended action

No immediate security action required. Reviewers may want to confirm that from_height/to_height are documented consistently and that the restored parameters behave as users expect, but the change appears to be a straightforward bug fix and feature restoration.

Security signals we found

01

Bug fix: wallet.get_onchain_history previously compared a TxMinedStatus object against integer heights, which would have silently broken height-based filtering

02

No input validation changes for from_height/to_height beyond existing sanity check that blocks mixing timestamp and height filters

03

Date serialization change removes brittle string slicing and makes timezone offset behavior explicit, though commit message notes timezone ambiguity remains

Risk score

Why this scored 17/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 3/15
Confidence 8/10
Evidence quality 4/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.