test: check P2SH sigop count for coinbase tx
This commit is contained in:
1 parent
6e5b67a370
commit
d6aaffcb11
1 file changed
+6
@@ -364,6 +364,12 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
|
|||||||
// 22 P2SH sigops for all inputs (1 for vin[0], 6 for vin[3], 15 for vin[4]
|
// 22 P2SH sigops for all inputs (1 for vin[0], 6 for vin[3], 15 for vin[4]
|
||||||
BOOST_CHECK_EQUAL(GetP2SHSigOpCount(CTransaction(txTo), coins), 22U);
|
BOOST_CHECK_EQUAL(GetP2SHSigOpCount(CTransaction(txTo), coins), 22U);
|
||||||
|
|
||||||
|
CMutableTransaction coinbase_tx_mut;
|
||||||
|
coinbase_tx_mut.vin.resize(1);
|
||||||
|
CTransaction coinbase_tx{coinbase_tx_mut};
|
||||||
|
BOOST_CHECK(coinbase_tx.IsCoinBase());
|
||||||
|
BOOST_CHECK_EQUAL(GetP2SHSigOpCount(coinbase_tx, coins), 0U);
|
||||||
|
|
||||||
CMutableTransaction txToNonStd1;
|
CMutableTransaction txToNonStd1;
|
||||||
txToNonStd1.vout.resize(1);
|
txToNonStd1.vout.resize(1);
|
||||||
txToNonStd1.vout[0].scriptPubKey = GetScriptForDestination(PKHash(key[1].GetPubKey()));
|
txToNonStd1.vout[0].scriptPubKey = GetScriptForDestination(PKHash(key[1].GetPubKey()));
|
||||||
|
|||||||
Reference in new issue
Block a user