mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-29 00:45:50 +01:00
Make DecodeHexTx return a CMutableTransaction
This commit is contained in:
@@ -267,7 +267,7 @@ 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();
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user