Remove getBlockDepth method from Chain::interface

Pass conflicting height in CWallet::MarkConflicted
This commit is contained in:
Antoine Riard
2019-04-29 10:18:50 -04:00
parent b66c429c56
commit 36b68de5b2
3 changed files with 1 additions and 11 deletions

View File

@@ -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