Commit 8247a8d
committed
Merge bitcoin/bitcoin#28154: test: refactor: deduplicate segwitv0 ECDSA signing for tx inputs
83d7cfd test: refactor: deduplicate segwitv0 ECDSA signing for tx inputs (Sebastian Falbesoner)
Pull request description:
This PR is a simple follow-up for #28025. It introduces a `signing_input_segwitv0` helper in order to deduplicate the following steps needed to create a segwitv0 ECDSA signature:
1. calculate the `SegwitV0SignatureHash` 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 (plus sighash byte) at the bottom of the witness stack
ACKs for top commit:
achow101:
ACK 83d7cfd
pinheadmz:
code review ACK at 83d7cfd
Tree-SHA512: b8e55409ddc9ddb14cfc06daeb4730d7750a4632f175f88dcac6ec4d216e71fd4a7eee325a64d6ebba3b33be50bcd30c2de7400f834c01abb67e52840d9823b62 files changed
+18
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | 73 | | |
75 | 74 | | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 124 | + | |
| 125 | + | |
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
| |||
1476 | 1474 | | |
1477 | 1475 | | |
1478 | 1476 | | |
1479 | | - | |
1480 | | - | |
1481 | 1477 | | |
1482 | | - | |
1483 | | - | |
| 1478 | + | |
| 1479 | + | |
1484 | 1480 | | |
1485 | 1481 | | |
1486 | 1482 | | |
| |||
1676 | 1672 | | |
1677 | 1673 | | |
1678 | 1674 | | |
1679 | | - | |
1680 | | - | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1681 | 1678 | | |
1682 | 1679 | | |
1683 | 1680 | | |
| 1681 | + | |
1684 | 1682 | | |
1685 | 1683 | | |
1686 | 1684 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
702 | 711 | | |
703 | 712 | | |
704 | 713 | | |
| |||
0 commit comments