-
Notifications
You must be signed in to change notification settings - Fork 881
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
feat: add append_receipts function #8718
Conversation
crates/storage/provider/src/bundle_state/bundle_state_with_receipts.rs
Outdated
Show resolved
Hide resolved
@mattsse @shekhirin ready for your feedback. tracked ci failure and issue seems to be related to #8166. |
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.
Some suggestions
if we return an Option, we'll have to do the error handling, so I have i have suggestion, if the receipts are empty, we can simply return the last |
crates/storage/provider/src/bundle_state/bundle_state_with_receipts.rs
Outdated
Show resolved
Hide resolved
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, thank you for addressing all the comments!
// If receipts are empty, we can simply return the current TxNumber as seen in the static | ||
// file. | ||
if receipts_iter.peek().is_none() { | ||
return Ok(self.writer.user_header().tx_end().expect("qed")); |
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.
the CI is failing because it's not guaranteed to have at least one receipt in static files. Let's make this method return Option<TxNumber>
.
@mattsse PTAL |
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, ty
Closes #8466