diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-05 08:07:22 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-05 08:07:45 +0100 |
commit | d04aebaec7bbf4095bd4f6a715eb6ee834857115 (patch) | |
tree | 170bba16ee5e0dda0b027d9e545f645ce8a9f950 /src/test/miner_tests.cpp | |
parent | 46904ee5d2ce867b522a582b23e1ac6735179e5c (diff) | |
parent | dd0df81ebdbf705f7ad386c7229bf1bbc3125f62 (diff) |
Merge #9014: Fix block-connection performance regression
dd0df81 Document ConnectBlock connectTrace postconditions (Matt Corallo)
2d6e561 Switch pblock in ProcessNewBlock to a shared_ptr (Matt Corallo)
2736c44 Make the optional pblock in ActivateBestChain a shared_ptr (Matt Corallo)
ae4db44 Create a shared_ptr for the block we're connecting in ActivateBCS (Matt Corallo)
fd9d890 Keep blocks as shared_ptrs, instead of copying txn in ConnectTip (Matt Corallo)
6fdd43b Add struct to track block-connect-time-generated info for callbacks (Matt Corallo)
Diffstat (limited to 'src/test/miner_tests.cpp')
-rw-r--r-- | src/test/miner_tests.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index ca703841db..bc1bdd8874 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -223,7 +223,8 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) txFirst.push_back(pblock->vtx[0]); pblock->hashMerkleRoot = BlockMerkleRoot(*pblock); pblock->nNonce = blockinfo[i].nonce; - BOOST_CHECK(ProcessNewBlock(chainparams, pblock, true, NULL, NULL)); + std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(*pblock); + BOOST_CHECK(ProcessNewBlock(chainparams, shared_pblock, true, NULL, NULL)); pblock->hashPrevBlock = pblock->GetHash(); } |