HomePhabricator

test: don't pad_tx in MiniWallet.sign_tx

Description

test: don't pad_tx in MiniWallet.sign_tx

Summary:
This is surprising behavior, and will generate non-standard transactions with 2 OPRETURN outputs if we try to use the target_size parameter in MiniWallet.create_self_transfer if the wallet is not in RAW_P2PK mode. The only reason it currently works in RAW_P2PK mode is that the tx is alreadly larger than 100 bytes and pad_tx(tx, 100) is a no-op.

Adjust the test that use MiniWallet.sign_tx. Note that pad_tx already take care of updating the tx hash, so no need to call tx.rehash.

Test Plan: ninja check-functional-extended

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Sat, Apr 5, 15:08
PiRKPushed on Mon, Apr 7, 10:48
Reviewer
Restricted Project
Differential Revision
D17901: test: don't pad_tx in MiniWallet.sign_tx
Parents
rABC0b3abacbb1bb: [Automated] Update chainparams
Branches
Unknown
Tags
Unknown