[pending] remove expired transactions from list
This commit is contained in:
parent
16e0b5353a
commit
cbe88eb511
1 changed files with 15 additions and 0 deletions
|
|
@ -227,6 +227,21 @@ namespace {
|
|||
_pending_transactions.erase(transaction_it);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove expired transactions from pending_transactions
|
||||
*/
|
||||
for (const auto& transaction: _pending_transactions)
|
||||
{
|
||||
if (transaction.expiration < block.timestamp)
|
||||
{
|
||||
auto transaction_it = find_transaction(_pending_transactions, transaction);
|
||||
if (_pending_transactions.end() != transaction_it)
|
||||
{
|
||||
_pending_transactions.erase(transaction_it);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue