Remove unused argument to RemoveStaged
This commit is contained in:
1 parent
bc64013e6f
commit
01d8520038
2 files changed
+7
-9
No files matched your search
+6
-6
@@ -198,7 +198,7 @@ void CTxMemPool::Apply(ChangeSet* changeset)
|
|||||||
AssertLockHeld(cs);
|
AssertLockHeld(cs);
|
||||||
m_txgraph->CommitStaging();
|
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) {
|
for (size_t i=0; i<changeset->m_entry_vec.size(); ++i) {
|
||||||
auto tx_entry = changeset->m_entry_vec[i];
|
auto tx_entry = changeset->m_entry_vec[i];
|
||||||
@@ -336,7 +336,7 @@ void CTxMemPool::removeRecursive(const CTransaction &origTx, MemPoolRemovalReaso
|
|||||||
CalculateDescendants(it, setAllRemoves);
|
CalculateDescendants(it, setAllRemoves);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveStaged(setAllRemoves, false, reason);
|
RemoveStaged(setAllRemoves, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTxMemPool::removeForReorg(CChain& chain, std::function<bool(txiter)> check_final_and_mature)
|
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) {
|
for (txiter it : txToRemove) {
|
||||||
CalculateDescendants(it, setAllRemoves);
|
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++) {
|
for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
|
||||||
assert(TestLockPointValidity(chain, it->GetLockPoints()));
|
assert(TestLockPointValidity(chain, it->GetLockPoints()));
|
||||||
}
|
}
|
||||||
@@ -392,7 +392,7 @@ void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigne
|
|||||||
setEntries stage;
|
setEntries stage;
|
||||||
stage.insert(it);
|
stage.insert(it);
|
||||||
txs_removed_for_block.emplace_back(*it);
|
txs_removed_for_block.emplace_back(*it);
|
||||||
RemoveStaged(stage, true, MemPoolRemovalReason::BLOCK);
|
RemoveStaged(stage, MemPoolRemovalReason::BLOCK);
|
||||||
}
|
}
|
||||||
removeConflicts(*tx);
|
removeConflicts(*tx);
|
||||||
ClearPrioritisation(tx->GetHash());
|
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);
|
AssertLockHeld(cs);
|
||||||
for (txiter it : stage) {
|
for (txiter it : stage) {
|
||||||
removeUnchecked(it, reason);
|
removeUnchecked(it, reason);
|
||||||
@@ -776,7 +776,7 @@ int CTxMemPool::Expire(std::chrono::seconds time)
|
|||||||
for (txiter removeit : toremove) {
|
for (txiter removeit : toremove) {
|
||||||
CalculateDescendants(removeit, stage);
|
CalculateDescendants(removeit, stage);
|
||||||
}
|
}
|
||||||
RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY);
|
RemoveStaged(stage, MemPoolRemovalReason::EXPIRY);
|
||||||
return stage.size();
|
return stage.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -578,10 +578,8 @@ private:
|
|||||||
* If a transaction is in this set, then all in-mempool descendants must
|
* 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
|
* also be in the set, unless this transaction is being removed for being
|
||||||
* in a block.
|
* 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,
|
/** Before calling removeUnchecked for a given transaction,
|
||||||
* UpdateForRemoveFromMempool must be called on the entire (dependent) set
|
* UpdateForRemoveFromMempool must be called on the entire (dependent) set
|
||||||
|
|||||||
Reference in new issue
Block a user