aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorAdam Jonas <jonas@chaincode.com>2019-10-21 15:42:06 -0400
committerAdam Jonas <jonas@chaincode.com>2019-10-28 10:26:46 -0400
commit436ad436434b94982bcb7dc1d13a21949263ef73 (patch)
tree9bb099ea82b8b2d40b68b7e8d1c3fa28add67e26 /src/wallet/rpcwallet.cpp
parent693e40090ae7af52585ce1a6136a4bd56318fac7 (diff)
downloadbitcoin-436ad436434b94982bcb7dc1d13a21949263ef73.tar.xz
Fix issue with conflicted mempool tx in listsinceblock
listsinceblock now checks that returned transactions are not conflicting with any transactions that are filtered out by the given blockhash Co-Authored-By: Michael Chrostowski <michael.chrostowski@gmail.com>
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index e571501221..591fb39bc1 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -1591,7 +1591,7 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
for (const std::pair<const uint256, CWalletTx>& pairWtx : pwallet->mapWallet) {
CWalletTx tx = pairWtx.second;
- if (depth == -1 || tx.GetDepthInMainChain(*locked_chain) < depth) {
+ if (depth == -1 || abs(tx.GetDepthInMainChain(*locked_chain)) < depth) {
ListTransactions(*locked_chain, pwallet, tx, 0, true, transactions, filter, nullptr /* filter_label */);
}
}