aboutsummaryrefslogtreecommitdiff
path: root/src/test/pmt_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-06-07 13:53:27 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-06-21 22:59:03 +0200
commit4949004d68dc08382df2c34ae519c1b1cfd60f1a (patch)
treee3c4b2d6fa162af1cfbe44f6deb39278c12c5672 /src/test/pmt_tests.cpp
parent8f59251b83cd9c862aee53dd50ce32bcab12ed6d (diff)
Add CMutableTransaction and make CTransaction immutable.
In addition, introduce a cached hash inside CTransaction, to prevent recalculating it over and over again.
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 7d7e6681df..9dce4daac6 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -36,9 +36,9 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
// build a block with some dummy transactions
CBlock block;
for (unsigned int j=0; j<nTx; j++) {
- CTransaction tx;
+ CMutableTransaction tx;
tx.nLockTime = rand(); // actual transaction data doesn't matter; just make the nLockTime's unique
- block.vtx.push_back(tx);
+ block.vtx.push_back(CTransaction(tx));
}
// calculate actual merkle root and height