diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-11-20 12:51:45 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-05-01 05:59:09 -0500 |
commit | d002f9d15d938e78360ad906f2d74a249c7e923e (patch) | |
tree | 63b347af7ca319e9ddc40fa8320b352b9af59788 /src/wallet/rpcwallet.cpp | |
parent | 65b9d8f8ddb5a838454efc8bdd6576f0deb65f6d (diff) |
Disable CWalletTx copy constructor
Disable copying of CWalletTx objects to prevent bugs where instances get copied
in and out of the mapWallet map and fields are updated in the wrong copy.
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 91162d575d..677b799d06 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1582,7 +1582,7 @@ static UniValue listsinceblock(const JSONRPCRequest& request) UniValue transactions(UniValue::VARR); for (const std::pair<const uint256, CWalletTx>& pairWtx : pwallet->mapWallet) { - CWalletTx tx = pairWtx.second; + const CWalletTx& tx = pairWtx.second; if (depth == -1 || abs(tx.GetDepthInMainChain()) < depth) { ListTransactions(pwallet, tx, 0, true, transactions, filter, nullptr /* filter_label */); |