Commit ecf07cb
committed
Merge #187: CScript.is_witness_scriptpubkey : size must match second byte + 2
629a919 CScript.is_witness_scriptpubkey : size must match second byte + 2 (Dmitry Petukhov)
Pull request description:
Model CScript.is_witness_scriptpubkey after bitcoind's
CScript::IsWitnessProgram -- it not only checks for script size
and first opcode, but also checks that data push size equals
script size + 2 (entire script consists of version byte
and data push). In absense of this check, is_witness_scriptpubkey
wrongfully detects 1-of-1 p2sh redeem script as a witness program.
Top commit has no ACKs.
Tree-SHA512: 83a1ac530a107a0b69b549a81c1c9eb87152dd3c1f06a768f3c469ec3ae28c33d104d69d45aac23b48b76087f869ed1195989880fda5a34b1c78fad8a3504d641 file changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | | - | |
682 | | - | |
683 | | - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
684 | 698 | | |
685 | 699 | | |
686 | 700 | | |
| |||
0 commit comments