Changeset View
Changeset View
Standalone View
Standalone View
src/test/txvalidationcache_tests.cpp
Show All 22 Lines | |||||
BOOST_AUTO_TEST_SUITE(txvalidationcache_tests) | BOOST_AUTO_TEST_SUITE(txvalidationcache_tests) | ||||
static bool ToMemPool(const CMutableTransaction &tx) { | static bool ToMemPool(const CMutableTransaction &tx) { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
CValidationState state; | CValidationState state; | ||||
return AcceptToMemoryPool(GetConfig(), mempool, state, | return AcceptToMemoryPool(GetConfig(), mempool, state, | ||||
MakeTransactionRef(tx), false, nullptr, true, | MakeTransactionRef(tx), false, nullptr, true); | ||||
Amount::zero()); | |||||
} | } | ||||
BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup) { | BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup) { | ||||
// Make sure skipping validation of transctions that were validated going | // Make sure skipping validation of transctions that were validated going | ||||
// into the memory pool does not allow double-spends in blocks to pass | // into the memory pool does not allow double-spends in blocks to pass | ||||
// validation when they should not. | // validation when they should not. | ||||
CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) | CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) | ||||
<< OP_CHECKSIG; | << OP_CHECKSIG; | ||||
▲ Show 20 Lines • Show All 354 Lines • Show Last 20 Lines |