mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-24 06:57:51 +01:00
Disallow OP_CMS in taproot (#4485)
This commit is contained in:
parent
cc45924ed8
commit
990e344a49
1 changed files with 7 additions and 1 deletions
|
@ -4,6 +4,7 @@ import org.bitcoins.core.consensus.Consensus
|
||||||
import org.bitcoins.core.crypto._
|
import org.bitcoins.core.crypto._
|
||||||
import org.bitcoins.core.protocol.script.{
|
import org.bitcoins.core.protocol.script.{
|
||||||
SigVersionBase,
|
SigVersionBase,
|
||||||
|
SigVersionTaproot,
|
||||||
SigVersionTaprootKeySpend,
|
SigVersionTaprootKeySpend,
|
||||||
SigVersionTapscript,
|
SigVersionTapscript,
|
||||||
SigVersionWitnessV0
|
SigVersionWitnessV0
|
||||||
|
@ -308,7 +309,12 @@ sealed abstract class CryptoInterpreter {
|
||||||
"Script top must be OP_CHECKMULTISIG")
|
"Script top must be OP_CHECKMULTISIG")
|
||||||
val flags = program.flags
|
val flags = program.flags
|
||||||
|
|
||||||
if (program.stack.size < 1) {
|
if (
|
||||||
|
program.txSignatureComponent.sigVersion
|
||||||
|
.isInstanceOf[SigVersionTaproot]
|
||||||
|
) {
|
||||||
|
program.failExecution(ScriptErrorTapScriptCheckMultiSig)
|
||||||
|
} else if (program.stack.size < 1) {
|
||||||
program.failExecution(ScriptErrorInvalidStackOperation)
|
program.failExecution(ScriptErrorInvalidStackOperation)
|
||||||
} else {
|
} else {
|
||||||
//these next lines remove the appropriate stack/script values after the signatures have been checked
|
//these next lines remove the appropriate stack/script values after the signatures have been checked
|
||||||
|
|
Loading…
Add table
Reference in a new issue