-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Yield after inserting a few pending transactions #18971
Copy link
Copy link
Closed
Labels
A-tx-poolRelated to the transaction mempoolRelated to the transaction mempoolC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Description
Describe the feature
this loop could potentially become a busy loop if new pending txs arrive faster than can be processed:
reth/crates/transaction-pool/src/pool/best.rs
Lines 165 to 168 in 0f919a9
| /// 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-tx-poolRelated to the transaction mempoolRelated to the transaction mempoolC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Type
Projects
Status
Done