-
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
refactor: use BlockWithSenders
in executors
#5771
Conversation
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.
should we remove the additional ;
? :)
pub fn with_recovered_senders(self) -> Option<BlockWithSenders> { | ||
let senders = self.senders()?; | ||
Some(BlockWithSenders { block: self, senders }) |
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.
should we return an Err(Self)
here?
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.
we don't use that anywhere so doesn't make sense imo
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
this forces the caller to do sender recovery and simplifies the functions
Removes the optional
senders
parameter in the executors and requires passing aBlockWithSenders
instead. Various utility functions exist on the block types to seal/unseal, provide senders and recover senders from signatures already. Since thesenders
parameter already required the user to possibly handle recovering themselves, we explicitly require it now, since it makes it easier to figure out how often you recover, which is an expensive operation.See the refd issue for more info
Closes #5767