aboutsummaryrefslogtreecommitdiff
path: root/src/test/pmt_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-10 17:26:00 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-19 17:51:09 -0800
commit1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (patch)
tree00b734409ca0ff817c36c000deae676df3cf16e2 /src/test/pmt_tests.cpp
parentda60506fc80f6a78f1b271a9a53b956b49b37234 (diff)
downloadbitcoin-1662b437b33b7ec5a1723f6ae6187d3bdd06f593.tar.xz
Make CBlock::vtx a vector of shared_ptr<CTransaction>
Diffstat (limited to 'src/test/pmt_tests.cpp')
-rw-r--r--src/test/pmt_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp
index c773129640..1552cb4baf 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -45,14 +45,14 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
for (unsigned int j=0; j<nTx; j++) {
CMutableTransaction tx;
tx.nLockTime = j; // actual transaction data doesn't matter; just make the nLockTime's unique
- block.vtx.push_back(CTransaction(tx));
+ block.vtx.push_back(std::make_shared<const CTransaction>(tx));
}
// calculate actual merkle root and height
uint256 merkleRoot1 = BlockMerkleRoot(block);
std::vector<uint256> vTxid(nTx, uint256());
for (unsigned int j=0; j<nTx; j++)
- vTxid[j] = block.vtx[j].GetHash();
+ vTxid[j] = block.vtx[j]->GetHash();
int nHeight = 1, nTx_ = nTx;
while (nTx_ > 1) {
nTx_ = (nTx_+1)/2;