diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-14 14:44:35 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-06-15 07:39:26 -0400 |
commit | fa34587f1c811d99200453b0936219c473f514b0 (patch) | |
tree | c9bdab467f7f00940e28cf0e2d71b407c09dbe92 /src/test/util | |
parent | fa6ef701adba1cb48535cac25fd43c742a82e40d (diff) | |
download | bitcoin-fa34587f1c811d99200453b0936219c473f514b0.tar.xz |
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-
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/mining.cpp | 2 | ||||
-rw-r--r-- | src/test/util/setup_common.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util/mining.cpp b/src/test/util/mining.cpp index b0c74954db..74536ae74c 100644 --- a/src/test/util/mining.cpp +++ b/src/test/util/mining.cpp @@ -32,7 +32,7 @@ CTxIn MineBlock(const NodeContext& node, const CScript& coinbase_scriptPubKey) assert(block->nNonce); } - bool processed{EnsureChainman(node).ProcessNewBlock(Params(), block, true, nullptr)}; + bool processed{Assert(node.chainman)->ProcessNewBlock(Params(), block, true, nullptr)}; assert(processed); return CTxIn{block->vtx[0]->GetHash(), 0}; diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 3b7a7c8d12..b8a64c3231 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -228,7 +228,7 @@ CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransa while (!CheckProofOfWork(block.GetHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce; std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block); - EnsureChainman(m_node).ProcessNewBlock(chainparams, shared_pblock, true, nullptr); + Assert(m_node.chainman)->ProcessNewBlock(chainparams, shared_pblock, true, nullptr); CBlock result = block; return result; |