Skip to content

Conversation

SomberNight
Copy link
Member

Conceptually this is quite an invasive change that transforms unverified txs to unconfirmed txs.

I think it is a code-safety improvement that might prevent security-bugs.
In particular the TxInput.block_height and TxInput.spent_height not being SPV-ed was really bothering me. This fixes that.

@SomberNight SomberNight added topic-transactions 📑 related to logic in transaction.py topic-wallet 👛 related to wallet.py, or maybe address_synchronizer.py/coinchooser.py labels Sep 10, 2025
@SomberNight SomberNight marked this pull request as ready for review September 11, 2025 17:38
angelsmia777-milionz

This comment was marked as spam.

electrum/util.py Outdated
header_hash: Optional[str] = None # hash of block that mined tx
wanted_height: Optional[int] = None # in case of timelock, min abs block height

def height(self, *, requires_spv: bool = True) -> int:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require_spv is unused, do we really need to add this option?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I had anticipated that to be needed but ended up not using it anywhere.
Force-pushed in https://github.com/spesmilo/electrum/compare/4d0a082e1e3b636af8e6b9dd955dee6e67eaa5ac..a4293c483e3ac3d83b501d8de1fe11799d9f818e

@SomberNight SomberNight merged commit de7612b into spesmilo:master Sep 24, 2025
3 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-transactions 📑 related to logic in transaction.py topic-wallet 👛 related to wallet.py, or maybe address_synchronizer.py/coinchooser.py
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants