aboutsummaryrefslogtreecommitdiff
path: root/src/test/merkle_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-10 17:34:17 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-19 17:53:23 -0800
commitb4e4ba475a5679e09f279aaf2a83dcf93c632bdb (patch)
tree31f4d8edd5134e92bf133ee3dfd52651c14ed21e /src/test/merkle_tests.cpp
parent1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (diff)
Introduce convenience type CTransactionRef
Diffstat (limited to 'src/test/merkle_tests.cpp')
-rw-r--r--src/test/merkle_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/merkle_tests.cpp b/src/test/merkle_tests.cpp
index 8aea571e12..55e6852a15 100644
--- a/src/test/merkle_tests.cpp
+++ b/src/test/merkle_tests.cpp
@@ -15,7 +15,7 @@ static uint256 BlockBuildMerkleTree(const CBlock& block, bool* fMutated, std::ve
{
vMerkleTree.clear();
vMerkleTree.reserve(block.vtx.size() * 2 + 16); // Safe upper bound for the number of total nodes.
- for (std::vector<std::shared_ptr<const CTransaction>>::const_iterator it(block.vtx.begin()); it != block.vtx.end(); ++it)
+ for (std::vector<CTransactionRef>::const_iterator it(block.vtx.begin()); it != block.vtx.end(); ++it)
vMerkleTree.push_back((*it)->GetHash());
int j = 0;
bool mutated = false;
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(merkle_test)
for (int j = 0; j < ntx; j++) {
CMutableTransaction mtx;
mtx.nLockTime = j;
- block.vtx[j] = std::make_shared<const CTransaction>(mtx);
+ block.vtx[j] = MakeTransactionRef(std::move(mtx));
}
// Compute the root of the block before mutating it.
bool unmutatedMutated = false;