Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,221 Lines • ▼ Show 20 Lines | void CWallet::blockConnected(const CBlock &block, | ||||
m_last_block_processed_height = height; | m_last_block_processed_height = height; | ||||
m_last_block_processed = block_hash; | m_last_block_processed = block_hash; | ||||
for (size_t index = 0; index < block.vtx.size(); index++) { | for (size_t index = 0; index < block.vtx.size(); index++) { | ||||
CWalletTx::Confirmation confirm(CWalletTx::Status::CONFIRMED, height, | CWalletTx::Confirmation confirm(CWalletTx::Status::CONFIRMED, height, | ||||
block_hash, index); | block_hash, index); | ||||
SyncTransaction(block.vtx[index], confirm); | SyncTransaction(block.vtx[index], confirm); | ||||
transactionRemovedFromMempool(block.vtx[index]); | transactionRemovedFromMempool(block.vtx[index]); | ||||
} | } | ||||
for (const CTransactionRef &ptx : vtxConflicted) { | |||||
transactionRemovedFromMempool(ptx); | |||||
} | |||||
} | } | ||||
void CWallet::blockDisconnected(const CBlock &block, int height) { | void CWallet::blockDisconnected(const CBlock &block, int height) { | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
// At block disconnection, this will change an abandoned transaction to | // At block disconnection, this will change an abandoned transaction to | ||||
// be unconfirmed, whether or not the transaction is added back to the | // be unconfirmed, whether or not the transaction is added back to the | ||||
// mempool. User may have to call abandontransaction again. It may be | // mempool. User may have to call abandontransaction again. It may be | ||||
▲ Show 20 Lines • Show All 3,814 Lines • Show Last 20 Lines |