aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/accounting_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-12-05 08:01:20 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-12-05 08:05:48 +0100
commit46904ee5d2ce867b522a582b23e1ac6735179e5c (patch)
treeac8c79733afef5eb6dff533ec867165d968d2b12 /src/wallet/test/accounting_tests.cpp
parent4d955fc5824b1891ea082f5ebdfa5473e37323ca (diff)
parent81e3228fcb33e8ed32d8b9fbe917444ba080073a (diff)
downloadbitcoin-46904ee5d2ce867b522a582b23e1ac6735179e5c.tar.xz
Merge #8580: Make CTransaction actually immutable
81e3228 Make CTransaction actually immutable (Pieter Wuille) 42fd8de Make DecodeHexTx return a CMutableTransaction (Pieter Wuille) c3f5673 Make CWalletTx store a CTransactionRef instead of inheriting (Pieter Wuille) a188353 Switch GetTransaction to returning a CTransactionRef (Pieter Wuille)
Diffstat (limited to 'src/wallet/test/accounting_tests.cpp')
-rw-r--r--src/wallet/test/accounting_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/test/accounting_tests.cpp b/src/wallet/test/accounting_tests.cpp
index a833be13d0..eb14d176bd 100644
--- a/src/wallet/test/accounting_tests.cpp
+++ b/src/wallet/test/accounting_tests.cpp
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
{
CMutableTransaction tx(wtx);
--tx.nLockTime; // Just to change the hash :)
- *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+ wtx.SetTx(MakeTransactionRef(std::move(tx)));
}
pwalletMain->AddToWallet(wtx);
vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);
@@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
{
CMutableTransaction tx(wtx);
--tx.nLockTime; // Just to change the hash :)
- *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+ wtx.SetTx(MakeTransactionRef(std::move(tx)));
}
pwalletMain->AddToWallet(wtx);
vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);