mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
scripted-diff: Replace ::mempool with m_node.mempool in tests
-BEGIN VERIFY SCRIPT- # tx pool member access (mempool followed by dot) sed --regexp-extended -i -e 's/(::)?\<mempool\>\.([a-zA-Z])/m_node.mempool->\2/g' $(git grep -l mempool ./src/test) # plain global (mempool not preceeded by dot, but followed by comma) sed --regexp-extended -i -e 's/([^\.])(::)?\<mempool\>,/\1*m_node.mempool,/g' $(git grep -l mempool ./src/test) -END VERIFY SCRIPT-
This commit is contained in:
@@ -70,7 +70,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
|
||||
LOCK(cs_main);
|
||||
BOOST_CHECK(::ChainActive().Tip()->GetBlockHash() != block.GetHash());
|
||||
}
|
||||
mempool.clear();
|
||||
m_node.mempool->clear();
|
||||
|
||||
// Test 3: ... and should be rejected if spend2 is in the memory pool
|
||||
BOOST_CHECK(ToMemPool(spends[1]));
|
||||
@@ -79,9 +79,9 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
|
||||
LOCK(cs_main);
|
||||
BOOST_CHECK(::ChainActive().Tip()->GetBlockHash() != block.GetHash());
|
||||
}
|
||||
mempool.clear();
|
||||
m_node.mempool->clear();
|
||||
|
||||
// Final sanity test: first spend in mempool, second in block, that's OK:
|
||||
// Final sanity test: first spend in *m_node.mempool, second in block, that's OK:
|
||||
std::vector<CMutableTransaction> oneSpend;
|
||||
oneSpend.push_back(spends[0]);
|
||||
BOOST_CHECK(ToMemPool(spends[1]));
|
||||
@@ -92,7 +92,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
|
||||
}
|
||||
// spends[1] should have been removed from the mempool when the
|
||||
// block with spends[0] is accepted:
|
||||
BOOST_CHECK_EQUAL(mempool.size(), 0U);
|
||||
BOOST_CHECK_EQUAL(m_node.mempool->size(), 0U);
|
||||
}
|
||||
|
||||
// Run CheckInputs (using CoinsTip()) on the given transaction, for all script
|
||||
|
||||
Reference in New Issue
Block a user