Skip to content

Commit

Permalink
fix: log the correct added at block for throttled ops
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-miao committed Jan 25, 2024
1 parent e01b87c commit ec66719
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/pool/src/mempool/uo_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,17 @@ where
if let Some(block) = block_seen {
if update.latest_block_number - block > self.config.throttled_entity_live_blocks
{
to_remove.insert(*hash);
to_remove.insert((*hash, block));
}
}
}
for hash in to_remove {
for (hash, added_at_block) in to_remove {
state.pool.remove_operation_by_hash(hash);
state.throttled_ops.remove(&hash);
self.emit(OpPoolEvent::RemovedOp {
op_hash: hash,
reason: OpRemovalReason::ThrottledAndOld {
added_at_block_number: state.block_number,
added_at_block_number: added_at_block,
current_block_number: update.latest_block_number,
},
})
Expand Down

0 comments on commit ec66719

Please sign in to comment.