mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
fix: ensure we poll again (#19866)
This commit is contained in:
@@ -1551,7 +1551,19 @@ where
|
||||
SOFT_LIMIT_COUNT_HASHES_IN_NEW_POOLED_TRANSACTIONS_BROADCAST_MESSAGE,
|
||||
) {
|
||||
Poll::Ready(count) => {
|
||||
count == SOFT_LIMIT_COUNT_HASHES_IN_NEW_POOLED_TRANSACTIONS_BROADCAST_MESSAGE
|
||||
if count == SOFT_LIMIT_COUNT_HASHES_IN_NEW_POOLED_TRANSACTIONS_BROADCAST_MESSAGE {
|
||||
// we filled the entire buffer capacity and need to try again on the next poll
|
||||
// immediately
|
||||
true
|
||||
} else {
|
||||
// try once more, because mostlikely the channel is now empty and the waker is
|
||||
// registered if this is pending, if we filled additional hashes, we poll again
|
||||
// on the next iteration
|
||||
let limit =
|
||||
SOFT_LIMIT_COUNT_HASHES_IN_NEW_POOLED_TRANSACTIONS_BROADCAST_MESSAGE -
|
||||
new_txs.len();
|
||||
this.pending_transactions.poll_recv_many(cx, &mut new_txs, limit).is_ready()
|
||||
}
|
||||
}
|
||||
Poll::Pending => false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user