mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 16:12:35 +02:00
scripted-diff: Replace EnsureChainman with Assert in unit tests
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i -e 's/EnsureChainman\((m?_?node)\)\./Assert(\1.chainman)->/g' $(git grep -l EnsureChainman) -END VERIFY SCRIPT-
This commit is contained in:
@ -118,7 +118,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
|
||||
// Prune the older block file.
|
||||
{
|
||||
LOCK(cs_main);
|
||||
EnsureChainman(m_node).PruneOneBlockFile(oldTip->GetBlockPos().nFile);
|
||||
Assert(m_node.chainman)->PruneOneBlockFile(oldTip->GetBlockPos().nFile);
|
||||
}
|
||||
UnlinkPrunedFiles({oldTip->GetBlockPos().nFile});
|
||||
|
||||
@ -144,7 +144,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
|
||||
// Prune the remaining block file.
|
||||
{
|
||||
LOCK(cs_main);
|
||||
EnsureChainman(m_node).PruneOneBlockFile(newTip->GetBlockPos().nFile);
|
||||
Assert(m_node.chainman)->PruneOneBlockFile(newTip->GetBlockPos().nFile);
|
||||
}
|
||||
UnlinkPrunedFiles({newTip->GetBlockPos().nFile});
|
||||
|
||||
@ -181,7 +181,7 @@ BOOST_FIXTURE_TEST_CASE(importmulti_rescan, TestChain100Setup)
|
||||
// Prune the older block file.
|
||||
{
|
||||
LOCK(cs_main);
|
||||
EnsureChainman(m_node).PruneOneBlockFile(oldTip->GetBlockPos().nFile);
|
||||
Assert(m_node.chainman)->PruneOneBlockFile(oldTip->GetBlockPos().nFile);
|
||||
}
|
||||
UnlinkPrunedFiles({oldTip->GetBlockPos().nFile});
|
||||
|
||||
|
Reference in New Issue
Block a user