HomePhabricator

[electrum] replace all len(tx.inputs()) with len(tx.txinputs())

Description

[electrum] replace all len(tx.inputs()) with len(tx.txinputs())

Summary: The former involves building a dictionary and converting various data to hex strings, while the latter just takes the len of a list. This turns the complexity from O(n) to O(1)

Test Plan:

grep -r 'len(.*\.inputs(' .
python test_runner.py

Reviewers: #bitcoin_abc, Fabien, bytesofman

Reviewed By: #bitcoin_abc, Fabien, bytesofman

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

Details

Provenance
PiRKAuthored on Nov 17 2023, 14:51
PiRKPushed on Nov 20 2023, 07:46
Reviewer
Restricted Project
Differential Revision
D14809: [electrum] replace all len(tx.inputs()) with len(tx.txinputs())
Parents
rABC70147cd6fda3: [Automated] Update seeds
Branches
Unknown
Tags
Unknown