Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,053 Lines • ▼ Show 20 Lines | bool CWallet::AbandonTransaction(const TxId &txid) { | ||||
return true; | return true; | ||||
} | } | ||||
void CWallet::MarkConflicted(const BlockHash &hashBlock, int conflicting_height, | void CWallet::MarkConflicted(const BlockHash &hashBlock, int conflicting_height, | ||||
const TxId &txid) { | const TxId &txid) { | ||||
auto locked_chain = chain().lock(); | auto locked_chain = chain().lock(); | ||||
LOCK(cs_wallet); | 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 | // 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 | // 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 case. | // when loading the wallet during a reindex. Do nothing in that case. | ||||
if (conflictconfirms >= 0) { | if (conflictconfirms >= 0) { | ||||
return; | return; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,415 Lines • Show Last 20 Lines |