diff options
| author | Pieter Wuille <[email protected]> | 2016-11-10 17:26:00 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-11-19 17:51:09 -0800 |
| commit | 1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (patch) | |
| tree | 00b734409ca0ff817c36c000deae676df3cf16e2 /src/test/pmt_tests.cpp | |
| parent | Add deserializing constructors to CTransaction and CMutableTransaction (diff) | |
| download | discoin-1662b437b33b7ec5a1723f6ae6187d3bdd06f593.tar.xz discoin-1662b437b33b7ec5a1723f6ae6187d3bdd06f593.zip | |
Make CBlock::vtx a vector of shared_ptr<CTransaction>
Diffstat (limited to 'src/test/pmt_tests.cpp')
| -rw-r--r-- | src/test/pmt_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp index c77312964..1552cb4ba 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; |