script: enforce PUSH_DATA codes for witness outputs
This commit is contained in:
parent
20a026aefe
commit
9f1d41fc44
1 changed files with 4 additions and 2 deletions
|
@ -210,14 +210,16 @@ function isWitnessPubKeyHashOutput (script) {
|
|||
var buffer = compile(script)
|
||||
|
||||
return buffer.length === 22 &&
|
||||
buffer[0] === OPS.OP_0
|
||||
buffer[0] === OPS.OP_0 &&
|
||||
buffer[1] === 0x14
|
||||
}
|
||||
|
||||
function isWitnessScriptHashOutput (script) {
|
||||
var buffer = compile(script)
|
||||
|
||||
return buffer.length === 34 &&
|
||||
buffer[0] === OPS.OP_0
|
||||
buffer[0] === OPS.OP_0 &&
|
||||
buffer[1] === 0x20
|
||||
}
|
||||
|
||||
// allowIncomplete is to account for combining signatures
|
||||
|
|
Loading…
Reference in a new issue