aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcdump.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/rpcdump.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/rpcdump.cpp')
-rw-r--r--src/wallet/rpcdump.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index 671b391c78..008a4ece19 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -267,11 +267,11 @@ UniValue importprunedfunds(const JSONRPCRequest& request)
"2. \"txoutproof\" (string, required) The hex output from gettxoutproof that contains the transaction\n"
);
- CTransaction tx;
+ CMutableTransaction tx;
if (!DecodeHexTx(tx, request.params[0].get_str()))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
uint256 hashTx = tx.GetHash();
- CWalletTx wtx(pwalletMain,tx);
+ CWalletTx wtx(pwalletMain, MakeTransactionRef(std::move(tx)));
CDataStream ssMB(ParseHexV(request.params[1], "proof"), SER_NETWORK, PROTOCOL_VERSION);
CMerkleBlock merkleBlock;
@@ -304,7 +304,7 @@ UniValue importprunedfunds(const JSONRPCRequest& request)
LOCK2(cs_main, pwalletMain->cs_wallet);
- if (pwalletMain->IsMine(tx)) {
+ if (pwalletMain->IsMine(wtx)) {
pwalletMain->AddToWallet(wtx, false);
return NullUniValue;
}