Skip to content

Yield after inserting a few pending transactions #18971

@mattsse

Description

@mattsse

Describe the feature

this loop could potentially become a busy loop if new pending txs arrive faster than can be processed:

/// Checks for new transactions that have come into the `PendingPool` after this iterator was
/// created and inserts them
fn add_new_transactions(&mut self) {
while let Some(pending_tx) = self.try_recv() {

TODO

  • break the while loop after ~16 iterations

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-tx-poolRelated to the transaction mempoolC-enhancementNew feature or requestD-good-first-issueNice and easy! A great choice to get started

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions