HomePhabricator

[electrum] move some methods from Transaction to TxInput

Description

[electrum] move some methods from Transaction to TxInput

Summary:
Remove some code duplication and move code that works purely on inputs to the TxInput class.
Keep some shortcuts/helpers in Transaction. We can remove them (and avoid a dict -> TxInput conversion) when Transaction entirely works with TxInputs instead of coin dicts.

The multisig_script function can be converted to using and returning bytes to reduce the number of needed conversions, now that it is mainly called in TxInput

Depends on D14493

Test Plan: python test_runner.py

Reviewers: #bitcoin_abc, bytesofman

Reviewed By: #bitcoin_abc, bytesofman

Subscribers: bytesofman

Differential Revision: https://reviews.bitcoinabc.org/D14494

Details

Provenance
PiRKAuthored on Sep 14 2023, 14:29
PiRKPushed on Sep 18 2023, 05:47
Reviewer
Restricted Project
Differential Revision
D14494: [electrum] move some methods from Transaction to TxInput
Parents
rABC383129c44661: [electrum] make TxInput properly support non serialized inputs
Branches
Unknown
Tags
Unknown