test: P2SH sig ops are only counted with SCRIPT_VERIFY_P2SH flag
This commit is contained in:
1 parent
b510893d00
commit
3a10d700bc
1 file changed
+3
@@ -151,6 +151,9 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
|
||||
BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, CScriptWitness());
|
||||
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags) == 2 * WITNESS_SCALE_FACTOR);
|
||||
assert(VerifyWithFlag(CTransaction(creationTx), spendingTx, flags) == SCRIPT_ERR_CHECKMULTISIGVERIFY);
|
||||
|
||||
// P2SH sigops are not counted if we don't set the SCRIPT_VERIFY_P2SH flag
|
||||
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, /*flags=*/0) == 0);
|
||||
}
|
||||
|
||||
// P2WPKH witness program
|
||||
|
||||
Reference in new issue
Block a user