-
Notifications
You must be signed in to change notification settings - Fork 65
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
Test cleanup #422
Test cleanup #422
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.
Looks good to me!
@@ -129,7 +129,7 @@ pub struct Environment { | |||
|
|||
/// The [`EVM`] that is used as an execution environment and database for | |||
/// calls and transactions. | |||
pub(crate) evm: EVM<CacheDB<EmptyDB>>, | |||
evm: EVM<CacheDB<EmptyDB>>, |
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.
Remind me why we are doing this again.
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.
Because we don't actually reference the evm
field of Environment
anywhere else in the crate, so we are safe to keep its visibility to private. I feel it's usually good to minimize visibility to the lowest point.
@@ -167,7 +173,7 @@ impl MiddlewareError for RevmMiddlewareError { | |||
} | |||
|
|||
fn as_inner(&self) -> Option<&Self::Inner> { | |||
Some(self) | |||
None |
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.
Can you explain this to me? The middleware onion has been a little black boxed for to only handle it on one layer at a time.
@@ -308,7 +313,13 @@ impl Middleware for RevmMiddleware { | |||
_gas_refunded: _, | |||
logs, | |||
output, | |||
} = unpack_execution_result(revm_result.result)?; | |||
} = match unpack_execution_result(revm_result.result) { |
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 i was wondering about this when i was debugging my issue
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.
Oh shit. I don't actually want to do it this way. Doing it with ?
is better.
Overview of tasks
RevmMiddlewareError
.Revert
andHalt
error variants.