You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin/bitcoin#29777: test: refactor: introduce and use calculate_input_weight helper
6d91cb7 test: add unit tests for `calculate_input_weight` (Sebastian Falbesoner)
f81fad5 test: introduce and use `calculate_input_weight` helper (Sebastian Falbesoner)
Pull request description:
Rather than manually estimating an input's weight by adding up all the involved components (fixed-size skeleton, compact-serialized lengths, and the actual scriptSig / witness stack items) we can simply take use of the serialization classes `CTxIn` / `CTxInWitness` instead, to achieve the same with significantly less code.
The new helper is used in the functional tests rpc_psbt.py and wallet_send.py, where the previous manual estimation code was
duplicated. Unit tests are added in the second commit.
ACKs for top commit:
kevkevinpal:
tACK [6d91cb7](bitcoin/bitcoin@6d91cb7)
QureshiFaisal:
tACK [6d91cb7](bitcoin/bitcoin@6d91cb7)
achow101:
ACK 6d91cb7
AngusP:
tACK 6d91cb7
rkrux:
tACK [6d91cb7](bitcoin/bitcoin@6d91cb7)
Tree-SHA512: 04424e4d94d0e13745a9c11df2dd3697c98552bbb0e792c4af67ecbb66060adc3cc0cefc202cdee2d9db0baf85b8bedf2eb339ac4b316d986b5f10f6b70c5a33
0 commit comments