diff options
| author | Matt Corallo <[email protected]> | 2016-12-04 00:17:30 -0800 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2016-12-04 00:17:30 -0800 |
| commit | 2d6e5619afa2d43a37a0a38daf33f58965ddfa80 (patch) | |
| tree | 9bdc85dfd1048bc7d7f2d535d9f63b3b373ef4d9 /src/test/test_bitcoin.cpp | |
| parent | Make the optional pblock in ActivateBestChain a shared_ptr (diff) | |
| download | discoin-2d6e5619afa2d43a37a0a38daf33f58965ddfa80.tar.xz discoin-2d6e5619afa2d43a37a0a38daf33f58965ddfa80.zip | |
Switch pblock in ProcessNewBlock to a shared_ptr
This (finally) fixes a performance regression in
b3b3c2a5623d5c942d2b3565cc2d833c65105555
Diffstat (limited to 'src/test/test_bitcoin.cpp')
| -rw-r--r-- | src/test/test_bitcoin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index f979d01a3..139389117 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; |