aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-04-22 18:45:39 -0400
committerAva Chow <github@achow101.com>2024-04-22 18:51:59 -0400
commit256e1703197fdddd78bc6d659431cd0fc3b63cde (patch)
tree86303f2edeac736964ce3e24ddc5cfedab0e5b03 /depends
parent10bd32a1c96802728ef5c0e7504e09eff423eed6 (diff)
parent6d91cb781c30966963f28e7577c7aa3829fa9390 (diff)
downloadbitcoin-256e1703197fdddd78bc6d659431cd0fc3b63cde.tar.xz
Merge bitcoin/bitcoin#29777: test: refactor: introduce and use `calculate_input_weight` helper
6d91cb781c30966963f28e7577c7aa3829fa9390 test: add unit tests for `calculate_input_weight` (Sebastian Falbesoner) f81fad5e0f3be1f7aed59f9da00396c75c2a6406 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](https://github.com/bitcoin/bitcoin/pull/29777/commits/6d91cb781c30966963f28e7577c7aa3829fa9390) QureshiFaisal: tACK [6d91cb7](https://github.com/bitcoin/bitcoin/pull/29777/commits/6d91cb781c30966963f28e7577c7aa3829fa9390) achow101: ACK 6d91cb781c30966963f28e7577c7aa3829fa9390 AngusP: tACK 6d91cb781c30966963f28e7577c7aa3829fa9390 rkrux: tACK [6d91cb7](https://github.com/bitcoin/bitcoin/pull/29777/commits/6d91cb781c30966963f28e7577c7aa3829fa9390) Tree-SHA512: 04424e4d94d0e13745a9c11df2dd3697c98552bbb0e792c4af67ecbb66060adc3cc0cefc202cdee2d9db0baf85b8bedf2eb339ac4b316d986b5f10f6b70c5a33
Diffstat (limited to 'depends')
0 files changed, 0 insertions, 0 deletions