aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Jonas <jonas@chaincode.com>2019-10-21 15:42:06 -0400
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2020-01-14 09:34:44 +0000
commit88729d804e39fbb42aa92c039afe3641edf9190c (patch)
tree1a1c5f34c58bbc658fec2e968c343413634dc047 /src
parenteafcea7a0ab17512f2b9e2a724685ca193920f04 (diff)
downloadbitcoin-88729d804e39fbb42aa92c039afe3641edf9190c.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> Github-Pull: #17258 Rebased-From: 436ad436434b94982bcb7dc1d13a21949263ef73
Diffstat (limited to 'src')
-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 96fa50d42e..2b1f9f3752 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -1599,7 +1599,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 */);
}
}