diff options
author | Pieter Wuille <pieter@wuille.net> | 2020-10-15 20:57:58 -0700 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2020-10-30 15:52:19 -0700 |
commit | 525cbd425e2f6a1dbd0febc53d7ada22cec4661f (patch) | |
tree | 20e972c680f5d5cb3d22060d9abb730a33d6e7ea /src/policy/policy.cpp | |
parent | 42b66a6b814bca130a9ccf0a3f747cf33d628232 (diff) |
Only relay Taproot spends if next block has it active
Diffstat (limited to 'src/policy/policy.cpp')
-rw-r--r-- | src/policy/policy.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index 69f2b456f1..91997aa883 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -155,7 +155,7 @@ bool IsStandardTx(const CTransaction& tx, bool permit_bare_multisig, const CFeeR * * Note that only the non-witness portion of the transaction is checked here. */ -bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) +bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs, bool taproot_active) { if (tx.IsCoinBase()) return true; // Coinbases don't use vin normally @@ -183,6 +183,9 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) if (subscript.GetSigOpCount(true) > MAX_P2SH_SIGOPS) { return false; } + } else if (whichType == TxoutType::WITNESS_V1_TAPROOT) { + // Don't allow Taproot spends unless Taproot is active. + if (!taproot_active) return false; } } |