aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/transactions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/rpc/transactions.cpp')
-rw-r--r--src/wallet/rpc/transactions.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/wallet/rpc/transactions.cpp b/src/wallet/rpc/transactions.cpp
index 05b340995d..5abc983701 100644
--- a/src/wallet/rpc/transactions.cpp
+++ b/src/wallet/rpc/transactions.cpp
@@ -39,11 +39,11 @@ static void WalletTxToJSON(const CWallet& wallet, const CWalletTx& wtx, UniValue
UniValue conflicts(UniValue::VARR);
for (const uint256& conflict : wallet.GetTxConflicts(wtx))
conflicts.push_back(conflict.GetHex());
- entry.pushKV("walletconflicts", conflicts);
+ entry.pushKV("walletconflicts", std::move(conflicts));
UniValue mempool_conflicts(UniValue::VARR);
for (const Txid& mempool_conflict : wtx.mempool_conflicts)
mempool_conflicts.push_back(mempool_conflict.GetHex());
- entry.pushKV("mempoolconflicts", mempool_conflicts);
+ entry.pushKV("mempoolconflicts", std::move(mempool_conflicts));
entry.pushKV("time", wtx.GetTxTime());
entry.pushKV("timereceived", int64_t{wtx.nTimeReceived});
@@ -172,8 +172,8 @@ static UniValue ListReceived(const CWallet& wallet, const UniValue& params, cons
transactions.push_back(_item.GetHex());
}
}
- obj.pushKV("txids", transactions);
- ret.push_back(obj);
+ obj.pushKV("txids", std::move(transactions));
+ ret.push_back(std::move(obj));
}
};
@@ -195,7 +195,7 @@ static UniValue ListReceived(const CWallet& wallet, const UniValue& params, cons
obj.pushKV("amount", ValueFromAmount(nAmount));
obj.pushKV("confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf));
obj.pushKV("label", entry.first);
- ret.push_back(obj);
+ ret.push_back(std::move(obj));
}
}
@@ -353,7 +353,7 @@ static void ListTransactions(const CWallet& wallet, const CWalletTx& wtx, int nM
if (fLong)
WalletTxToJSON(wallet, wtx, entry);
entry.pushKV("abandoned", wtx.isAbandoned());
- ret.push_back(entry);
+ ret.push_back(std::move(entry));
}
}
@@ -396,7 +396,7 @@ static void ListTransactions(const CWallet& wallet, const CWalletTx& wtx, int nM
entry.pushKV("abandoned", wtx.isAbandoned());
if (fLong)
WalletTxToJSON(wallet, wtx, entry);
- ret.push_back(entry);
+ ret.push_back(std::move(entry));
}
}
}
@@ -682,8 +682,8 @@ RPCHelpMan listsinceblock()
CHECK_NONFATAL(wallet.chain().findAncestorByHeight(wallet.GetLastBlockHash(), wallet.GetLastBlockHeight() + 1 - target_confirms, FoundBlock().hash(lastblock)));
UniValue ret(UniValue::VOBJ);
- ret.pushKV("transactions", transactions);
- if (include_removed) ret.pushKV("removed", removed);
+ ret.pushKV("transactions", std::move(transactions));
+ if (include_removed) ret.pushKV("removed", std::move(removed));
ret.pushKV("lastblock", lastblock.GetHex());
return ret;
@@ -789,14 +789,14 @@ RPCHelpMan gettransaction()
UniValue details(UniValue::VARR);
ListTransactions(*pwallet, wtx, 0, false, details, filter, /*filter_label=*/std::nullopt);
- entry.pushKV("details", details);
+ entry.pushKV("details", std::move(details));
entry.pushKV("hex", EncodeHexTx(*wtx.tx));
if (verbose) {
UniValue decoded(UniValue::VOBJ);
TxToUniv(*wtx.tx, /*block_hash=*/uint256(), /*entry=*/decoded, /*include_hex=*/false);
- entry.pushKV("decoded", decoded);
+ entry.pushKV("decoded", std::move(decoded));
}
AppendLastProcessedBlock(entry, *pwallet);