HomePhabricator

[electrum] estime tx size without serializing

Description

[electrum] estime tx size without serializing

Summary:
This removes some overhead from the transaction size estimation, by removing the need to serialize the transaction to an hexadecimal string.

Fix txinputs so it works also for inputs that don't have a "scriptSig" field (transaction that were not constructed by deserialization, partially signed transactions).
Note that input_script uses the existing "scriptSig" if available, so in this case it does not add much overhead.

Refactor the boilerplate code for checking the txid in tests, and test the tx size as well.

Depends on D14447

Test Plan: python test_runner.py

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Sep 5 2023, 09:00
PiRKPushed on Sep 5 2023, 16:14
Reviewer
Restricted Project
Differential Revision
D14448: [electrum] estime tx size without serializing
Parents
rABC0141616c41ed: [electrum] fix compact_size_nbytes for 0-length scripts
Branches
Unknown
Tags
Unknown