mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Remove unused argument to RemoveStaged
This commit is contained in:
committed by
Suhas Daftuar
parent
bc64013e6f
commit
01d8520038
@@ -198,7 +198,7 @@ void CTxMemPool::Apply(ChangeSet* changeset)
|
||||
AssertLockHeld(cs);
|
||||
m_txgraph->CommitStaging();
|
||||
|
||||
RemoveStaged(changeset->m_to_remove, false, MemPoolRemovalReason::REPLACED);
|
||||
RemoveStaged(changeset->m_to_remove, MemPoolRemovalReason::REPLACED);
|
||||
|
||||
for (size_t i=0; i<changeset->m_entry_vec.size(); ++i) {
|
||||
auto tx_entry = changeset->m_entry_vec[i];
|
||||
@@ -336,7 +336,7 @@ void CTxMemPool::removeRecursive(const CTransaction &origTx, MemPoolRemovalReaso
|
||||
CalculateDescendants(it, setAllRemoves);
|
||||
}
|
||||
|
||||
RemoveStaged(setAllRemoves, false, reason);
|
||||
RemoveStaged(setAllRemoves, reason);
|
||||
}
|
||||
|
||||
void CTxMemPool::removeForReorg(CChain& chain, std::function<bool(txiter)> check_final_and_mature)
|
||||
@@ -354,7 +354,7 @@ void CTxMemPool::removeForReorg(CChain& chain, std::function<bool(txiter)> check
|
||||
for (txiter it : txToRemove) {
|
||||
CalculateDescendants(it, setAllRemoves);
|
||||
}
|
||||
RemoveStaged(setAllRemoves, false, MemPoolRemovalReason::REORG);
|
||||
RemoveStaged(setAllRemoves, MemPoolRemovalReason::REORG);
|
||||
for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
|
||||
assert(TestLockPointValidity(chain, it->GetLockPoints()));
|
||||
}
|
||||
@@ -392,7 +392,7 @@ void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigne
|
||||
setEntries stage;
|
||||
stage.insert(it);
|
||||
txs_removed_for_block.emplace_back(*it);
|
||||
RemoveStaged(stage, true, MemPoolRemovalReason::BLOCK);
|
||||
RemoveStaged(stage, MemPoolRemovalReason::BLOCK);
|
||||
}
|
||||
removeConflicts(*tx);
|
||||
ClearPrioritisation(tx->GetHash());
|
||||
@@ -744,7 +744,7 @@ void CTxMemPool::RemoveUnbroadcastTx(const Txid& txid, const bool unchecked) {
|
||||
}
|
||||
}
|
||||
|
||||
void CTxMemPool::RemoveStaged(setEntries &stage, bool updateDescendants, MemPoolRemovalReason reason) {
|
||||
void CTxMemPool::RemoveStaged(setEntries &stage, MemPoolRemovalReason reason) {
|
||||
AssertLockHeld(cs);
|
||||
for (txiter it : stage) {
|
||||
removeUnchecked(it, reason);
|
||||
@@ -776,7 +776,7 @@ int CTxMemPool::Expire(std::chrono::seconds time)
|
||||
for (txiter removeit : toremove) {
|
||||
CalculateDescendants(removeit, stage);
|
||||
}
|
||||
RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY);
|
||||
RemoveStaged(stage, MemPoolRemovalReason::EXPIRY);
|
||||
return stage.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -578,10 +578,8 @@ private:
|
||||
* If a transaction is in this set, then all in-mempool descendants must
|
||||
* also be in the set, unless this transaction is being removed for being
|
||||
* in a block.
|
||||
* Set updateDescendants to true when removing a tx that was in a block, so
|
||||
* that any in-mempool descendants have their ancestor state updated.
|
||||
*/
|
||||
void RemoveStaged(setEntries& stage, bool updateDescendants, MemPoolRemovalReason reason) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
void RemoveStaged(setEntries& stage, MemPoolRemovalReason reason) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
|
||||
/** Before calling removeUnchecked for a given transaction,
|
||||
* UpdateForRemoveFromMempool must be called on the entire (dependent) set
|
||||
|
||||
Reference in New Issue
Block a user