fix: handle calls to eoa (#159)

This commit is contained in:
Noah Citron 2022-12-21 19:11:43 -05:00 committed by GitHub
parent bfe44809d8
commit f8275f054e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ impl<'a, R: ExecutionRpc> Evm<'a, R> {
TransactOut::Call(bytes) => Err(EvmError::Revert(Some(bytes))), TransactOut::Call(bytes) => Err(EvmError::Revert(Some(bytes))),
_ => Err(EvmError::Revert(None)), _ => Err(EvmError::Revert(None)),
}, },
revm::Return::Return => { revm::Return::Return | revm::Return::Stop => {
if let Some(err) = &self.evm.db.as_ref().unwrap().error { if let Some(err) = &self.evm.db.as_ref().unwrap().error {
return Err(EvmError::Generic(err.clone())); return Err(EvmError::Generic(err.clone()));
} }
@ -88,7 +88,7 @@ impl<'a, R: ExecutionRpc> Evm<'a, R> {
TransactOut::Call(bytes) => Err(EvmError::Revert(Some(bytes))), TransactOut::Call(bytes) => Err(EvmError::Revert(Some(bytes))),
_ => Err(EvmError::Revert(None)), _ => Err(EvmError::Revert(None)),
}, },
revm::Return::Return => { revm::Return::Return | revm::Return::Stop => {
if let Some(err) = &self.evm.db.as_ref().unwrap().error { if let Some(err) = &self.evm.db.as_ref().unwrap().error {
return Err(EvmError::Generic(err.clone())); return Err(EvmError::Generic(err.clone()));
} }