aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2023-07-11 17:16:14 -0400
committerAndrew Chow <github@achow101.com>2023-07-11 17:25:40 -0400
commit357e3f6aa476658aecae7239b4b06d2bc362ff1e (patch)
tree67f27f471bfd8e5c78d39e1053dfedb1d7d65564 /ci
parent99b3af78bd5209b3ed0b192d0b18ee2c49079d1d (diff)
parent5cf44275c8ca8c32d238f37f717d78e9823f44c2 (diff)
downloadbitcoin-357e3f6aa476658aecae7239b4b06d2bc362ff1e.tar.xz
Merge bitcoin/bitcoin#28025: test: refactor: deduplicate legacy ECDSA signing for tx inputs
5cf44275c8ca8c32d238f37f717d78e9823f44c2 test: refactor: deduplicate legacy ECDSA signing for tx inputs (Sebastian Falbesoner) Pull request description: There are several instances in functional tests and the framework (MiniWallet, feature_block.py, p2p_segwit.py) where we create a legacy ECDSA signature for a certain transaction's input by doing the following steps: 1. calculate the `LegacySignatureHash` with the desired sighash type 2. create the actual digital signature by calling `ECKey.sign_ecdsa` on the signature message hash calculated above 3. put the DER-encoded result as CScript data push into tx input's scriptSig Create a new helper `sign_input_legacy` which hides those details and takes only the necessary parameters (tx, input index, relevant scriptPubKey, private key, sighash type [SIGHASH_ALL by default]). For further convenience, the signature is prepended to already existing data-pushes in scriptSig, in order to avoid rehashing the transaction after calling the new signing function. ACKs for top commit: dimitaracev: ACK `5cf4427` achow101: ACK 5cf44275c8ca8c32d238f37f717d78e9823f44c2 pinheadmz: ACK 5cf44275c8ca8c32d238f37f717d78e9823f44c2 Tree-SHA512: 8f0e4fb2c3e0f84fac5dbc4dda87973276242b0f628034272a7f3e45434c1e17dd1b26a37edfb302dcaf380dbfe98b0417391ace5e0ac9720155d8fba702031e
Diffstat (limited to 'ci')
0 files changed, 0 insertions, 0 deletions