-
Notifications
You must be signed in to change notification settings - Fork 4.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
Make prepare_simulation_batch() more usable #32304
Make prepare_simulation_batch() more usable #32304
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32304 +/- ##
=======================================
Coverage 82.0% 82.0%
=======================================
Files 773 773
Lines 209616 209619 +3
=======================================
+ Hits 172038 172041 +3
Misses 37578 37578 |
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.
Change itself looks good. Slight hesitation on the naming, as there's no indication (just from the name) that this is for a single transaction "batch".
From the other fns in this area I'd assume I pass it a transactions: &'b [SanitizedTransaction],
wdyt?
nice suggestion: fc8edca |
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.
lgtm - though you might want to wait for @ilya-bobyr's review; I saw you explicitly requested his review and I just happen to notice the PR.
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.
Somehow, this PR was not in my inbox %)
I must have opened it and then closed the tab by accident.
Looks good to me.
runtime/src/bank.rs
Outdated
let mut batch = TransactionBatch::new( | ||
vec![lock_result], | ||
self, | ||
Cow::Borrowed(std::slice::from_ref(transaction)), |
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.
minor
I think in most cases, elements are imported, up to a certain meaningful parent, rather than referenced with the full path. Even for std
:
use std::slice;
And then
Cow::Borrowed(std::slice::from_ref(transaction)), | |
Cow::Borrowed(slice::from_ref(transaction)), |
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.
nice! done 3287105
Problem
prepare_simulation_batch
requires.clone()
-ing.Summary of Changes
TransactionBatch
in the hope of avoiding some internal cloning... Originally, i thought generic approach made sense: Add new execution code-path for unified scheduler #31239 (comment)Fixes #