-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(txpool): use Vec in validate_all #5044
Conversation
Codecov Report
... and 35 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
crates/transaction-pool/src/lib.rs
Outdated
for tx in transactions.into_iter() { | ||
let validate_outcome = self.validate(origin, tx).await; | ||
outcomes.push(validate_outcome); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not equivalent because now all futures are polled one by one
this should just collect into a vec instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, forgot that join_all would be better and preserves input order
Uses a
Vec
invalidate_all
so the order can be preserved. The transactions are now validated in the order they are inserted