was missing a couple pattern matches on the new scriptPubKey type, WitnessCommitment

This commit is contained in:
Chris Stewart 2016-12-28 09:51:25 -06:00
parent a7a38881db
commit 897719a854

View File

@ -75,8 +75,8 @@ trait ScriptInterpreter extends CryptoInterpreter with StackInterpreter with Con
case p2sh : P2SHScriptPubKey =>
if (p2shEnabled) executeP2shScript(scriptSigExecutedProgram, program, p2sh)
else scriptPubKeyExecutedProgram
case _ @ (_ : P2PKHScriptPubKey | _: P2PKScriptPubKey | _: MultiSignatureScriptPubKey | _: CSVScriptPubKey |
_ : CLTVScriptPubKey | _ : NonStandardScriptPubKey | EmptyScriptPubKey) =>
case _ : P2PKHScriptPubKey | _: P2PKScriptPubKey | _: MultiSignatureScriptPubKey | _: CSVScriptPubKey |
_ : CLTVScriptPubKey | _ : NonStandardScriptPubKey | _ : WitnessCommitment | EmptyScriptPubKey =>
scriptPubKeyExecutedProgram
}
}
@ -160,7 +160,7 @@ trait ScriptInterpreter extends CryptoInterpreter with StackInterpreter with Con
run(scriptPubKeyExecutedProgram,stack,w)
}
case s @ (_ : P2SHScriptPubKey | _ : P2PKHScriptPubKey | _ : P2PKScriptPubKey | _ : MultiSignatureScriptPubKey |
_ : CLTVScriptPubKey | _ : CSVScriptPubKey | _: NonStandardScriptPubKey | EmptyScriptPubKey) =>
_ : CLTVScriptPubKey | _ : CSVScriptPubKey | _: NonStandardScriptPubKey | _ : WitnessCommitment | EmptyScriptPubKey) =>
logger.debug("redeemScript: " + s.asm)
run(scriptPubKeyExecutedProgram,stack,s)
}
@ -516,7 +516,7 @@ trait ScriptInterpreter extends CryptoInterpreter with StackInterpreter with Con
w.witness.stack.isEmpty
}
case _ : CLTVScriptPubKey | _ : CSVScriptPubKey | _ : MultiSignatureScriptPubKey | _ : NonStandardScriptPubKey |
_ : P2PKScriptPubKey | _ : P2PKHScriptPubKey | EmptyScriptPubKey =>
_ : P2PKScriptPubKey | _ : P2PKHScriptPubKey | _ : WitnessCommitment | EmptyScriptPubKey =>
w.witness.stack.isEmpty
}
!witnessedUsed