aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-12-05 08:07:22 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-12-05 08:07:45 +0100
commitd04aebaec7bbf4095bd4f6a715eb6ee834857115 (patch)
tree170bba16ee5e0dda0b027d9e545f645ce8a9f950 /src/test/test_bitcoin.cpp
parent46904ee5d2ce867b522a582b23e1ac6735179e5c (diff)
parentdd0df81ebdbf705f7ad386c7229bf1bbc3125f62 (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/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index f979d01a37..139389117a 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -127,7 +127,8 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>&
while (!CheckProofOfWork(block.GetHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce;
- ProcessNewBlock(chainparams, &block, true, NULL, NULL);
+ std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block);
+ ProcessNewBlock(chainparams, shared_pblock, true, NULL, NULL);
CBlock result = block;
return result;