Fix: Allow detection of 1 byte annexes

This commit is contained in:
junderw 2023-07-13 13:31:57 +09:00
parent 2b0dbcfcc8
commit 376ec71773

View File

@ -560,7 +560,6 @@ export class Common {
const witness = input.witness;
// See BIP 341: Script validation rules
const hasAnnex = witness.length >= 2 &&
witness[witness.length - 1].length > 1 &&
witness[witness.length - 1][0] === 0x50;
const scriptSpendMinLength = hasAnnex ? 3 : 2;
const maybeScriptSpend = witness.length >= scriptSpendMinLength;