aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorAntoine Riard <ariard@student.42.fr>2019-04-29 10:18:50 -0400
committerAntoine Riard <ariard@student.42.fr>2019-11-06 13:36:43 -0500
commit36b68de5b2938722911db900ca299f7008780d01 (patch)
tree3791969a005bbd1c2982cb8c2a510a8975cc3b7c /src/wallet
parentb66c429c56c85fa16c309be0b2bca9c25fdd3e1a (diff)
downloadbitcoin-36b68de5b2938722911db900ca299f7008780d01.tar.xz
Remove getBlockDepth method from Chain::interface
Pass conflicting height in CWallet::MarkConflicted
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 4936e3851b..2bc39ea3d9 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -986,7 +986,7 @@ void CWallet::MarkConflicted(const uint256& hashBlock, int conflicting_height, c
auto locked_chain = chain().lock();
LOCK(cs_wallet);
- int conflictconfirms = -locked_chain->getBlockDepth(hashBlock);
+ int conflictconfirms = (m_last_block_processed_height - conflicting_height + 1) * -1;
// If number of conflict confirms cannot be determined, this means
// that the block is still unknown or not yet part of the main chain,
// for example when loading the wallet during a reindex. Do nothing in that