Page MenuHomePhabricator

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

Authored by PiRK on Nov 17 2023, 15:21.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable