-
Notifications
You must be signed in to change notification settings - Fork 94
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
Bugfix: more receipt generation issues with debugger #908
Conversation
@@ -1042,16 +1044,11 @@ where | |||
&self.balances, | |||
gas_price, | |||
)?; | |||
self.update_transaction_outputs()?; | |||
*self.tx.as_script_mut().unwrap().receipts_root_mut() = self.receipts.root(); |
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.
Whiel it is true that we run only script, I still prefer to sue if let Some(script)
=)
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.
At the top of the function we error if as_script()
cannot be used. We only access it again like this to satisfy borrow checker.
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.
Then would be nice to have expect
and the comment that point to the top=D
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.
I agree. I don't think we should unwrap
anywhere in our prod code. I prefer the type-safe approach too--expect
is more acceptable than unwrap
but it's fragile still.
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.
Fixed in 690a381.
While #889 fixed some receipt generation issues it missed regenerating receipts_root after the debugger is done. Also the in-memory outputs were updated too early.
Checklist
Before requesting review