MCPcopy Create free account
hub / github.com/ElementsProject/elements / Expire

Method Expire

src/txmempool.cpp:1159–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1157}
1158
1159int CTxMemPool::Expire(std::chrono::seconds time)
1160{
1161 AssertLockHeld(cs);
1162 indexed_transaction_set::index<entry_time>::type::iterator it = mapTx.get<entry_time>().begin();
1163 setEntries toremove;
1164 while (it != mapTx.get<entry_time>().end() && it->GetTime() < time) {
1165 toremove.insert(mapTx.project<0>(it));
1166 it++;
1167 }
1168 setEntries stage;
1169 for (txiter removeit : toremove) {
1170 CalculateDescendants(removeit, stage);
1171 }
1172 RemoveStaged(stage, false, MemPoolRemovalReason::EXPIRY);
1173 return stage.size();
1174}
1175
1176void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, bool validFeeEstimate)
1177{

Callers 1

validation.cppFile · 0.80

Calls 5

GetTimeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected