mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
Simplify counting of P2SH sigops to match BIP 16 (thanks to Matt Corallo for prompting this).
This also removes an un-needed sigops-per-byte check when accepting transactions to the memory pool (un-needed assuming only standard transactions are being accepted). And it only counts P2SH sigops after the switchover date.
This commit is contained in:
@ -78,7 +78,6 @@ BOOST_AUTO_TEST_CASE(test_Get)
|
||||
t1.vout[0].scriptPubKey << OP_1;
|
||||
|
||||
BOOST_CHECK(t1.AreInputsStandard(dummyInputs));
|
||||
BOOST_CHECK_EQUAL(t1.GetSigOpCount(dummyInputs), 3);
|
||||
BOOST_CHECK_EQUAL(t1.GetValueIn(dummyInputs), (50+21+22)*CENT);
|
||||
}
|
||||
|
||||
@ -103,7 +102,6 @@ BOOST_AUTO_TEST_CASE(test_GetThrow)
|
||||
t1.vout[0].scriptPubKey << OP_1;
|
||||
|
||||
BOOST_CHECK_THROW(t1.AreInputsStandard(missingInputs), runtime_error);
|
||||
BOOST_CHECK_THROW(t1.GetSigOpCount(missingInputs), runtime_error);
|
||||
BOOST_CHECK_THROW(t1.GetValueIn(missingInputs), runtime_error);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user