aboutsummaryrefslogtreecommitdiff
path: root/src/test/accounting_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-06-22 20:40:53 +0200
committerPieter Wuille <[email protected]>2014-06-22 20:45:30 +0200
commitd4e4e05435a93a72711120f46ee79482c13fae45 (patch)
treeaeb3e1ba960864e331b647abbfabe2ecb5a90c45 /src/test/accounting_tests.cpp
parentMerge pull request #4381 (diff)
parentCode simplifications after CTransaction::GetHash() caching (diff)
downloaddiscoin-d4e4e05435a93a72711120f46ee79482c13fae45.tar.xz
discoin-d4e4e05435a93a72711120f46ee79482c13fae45.zip
Merge pull request #4309
d38da59 Code simplifications after CTransaction::GetHash() caching (Pieter Wuille) 4949004 Add CMutableTransaction and make CTransaction immutable. (Pieter Wuille)
Diffstat (limited to 'src/test/accounting_tests.cpp')
-rw-r--r--src/test/accounting_tests.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/accounting_tests.cpp b/src/test/accounting_tests.cpp
index e2a75da34..4bee0f6b6 100644
--- a/src/test/accounting_tests.cpp
+++ b/src/test/accounting_tests.cpp
@@ -83,13 +83,21 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
wtx.mapValue["comment"] = "y";
- --wtx.nLockTime; // Just to change the hash :)
+ {
+ CMutableTransaction tx(wtx);
+ --tx.nLockTime; // Just to change the hash :)
+ *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+ }
pwalletMain->AddToWallet(wtx);
vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);
vpwtx[1]->nTimeReceived = (unsigned int)1333333336;
wtx.mapValue["comment"] = "x";
- --wtx.nLockTime; // Just to change the hash :)
+ {
+ CMutableTransaction tx(wtx);
+ --tx.nLockTime; // Just to change the hash :)
+ *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+ }
pwalletMain->AddToWallet(wtx);
vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);
vpwtx[2]->nTimeReceived = (unsigned int)1333333329;