sweep() does not check UTXOs for maturity
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
When sweeping private keys, Electrum does not check coin maturity.
Something along the lines of
if self.utxo_is_coinbase(item) and item['height'] + COINBASE_MATURITY - 1 > self.get_local_height():
continue
should be done. Not sure how best to implement utxo_is_coinbase().
I guess this probably doesn't affect many people.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the sweep() implementation and trace how each UTXO is identified, including where coinbase status and local height are available. Confirm how COINBASE_MATURITY should be applied, then verify that immature coinbase outputs are skipped while mature outputs remain sweepable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100