Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
| Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | void CTxMemPool::removeForFinalizedBlock( | ||||
| for (const auto &entry : finalizedTxsToKeep) { | for (const auto &entry : finalizedTxsToKeep) { | ||||
| // We don't need to proceed to all the checks that happen during | // We don't need to proceed to all the checks that happen during | ||||
| // finalization here so we only recompute the size and sigchecks. | // finalization here so we only recompute the size and sigchecks. | ||||
| if (finalizedTxs.insert(entry)) { | if (finalizedTxs.insert(entry)) { | ||||
| m_finalizedTxsFitter.addTx(entry->GetTxSize(), | m_finalizedTxsFitter.addTx(entry->GetTxSize(), | ||||
| entry->GetSigChecks(), entry->GetFee()); | entry->GetSigChecks(), entry->GetFee()); | ||||
| } | } | ||||
| } | } | ||||
| nTransactionsUpdated++; | |||||
| } | } | ||||
| void CTxMemPool::_clear() { | void CTxMemPool::_clear() { | ||||
| mapTx.clear(); | mapTx.clear(); | ||||
| mapNextTx.clear(); | mapNextTx.clear(); | ||||
| totalTxSize = 0; | totalTxSize = 0; | ||||
| m_total_fee = Amount::zero(); | m_total_fee = Amount::zero(); | ||||
| cachedInnerUsage = 0; | cachedInnerUsage = 0; | ||||
| ▲ Show 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | for (txiter ancestor_it : setAncestors) { | ||||
| (*ancestor_it)->GetFee()); | (*ancestor_it)->GetFee()); | ||||
| finalizedTxIds.push_back((*ancestor_it)->GetTx().GetId()); | finalizedTxIds.push_back((*ancestor_it)->GetTx().GetId()); | ||||
| GetMainSignals().TransactionFinalized((*it)->GetSharedTx()); | GetMainSignals().TransactionFinalized((*it)->GetSharedTx()); | ||||
| } | } | ||||
| } | } | ||||
| nTransactionsUpdated++; | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool CTxMemPool::isWorthPolling(const CTransactionRef &tx) const { | bool CTxMemPool::isWorthPolling(const CTransactionRef &tx) const { | ||||
| AssertLockHeld(cs); | AssertLockHeld(cs); | ||||
| AssertLockNotHeld(cs_conflicting); | AssertLockNotHeld(cs_conflicting); | ||||
| const TxId &txid = tx->GetId(); | const TxId &txid = tx->GetId(); | ||||
| ▲ Show 20 Lines • Show All 391 Lines • Show Last 20 Lines | |||||