Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Treat empty account the same as non-exist accounts in EIP-1052 (#10775)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorpaas authored and s3krit committed Jun 25, 2019
1 parent 06939d8 commit 8560755
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ethcore/src/externalities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B>
}

fn extcodehash(&self, address: &Address) -> vm::Result<Option<H256>> {
Ok(self.state.code_hash(address)?)
if self.state.exists_and_not_null(address)? {
Ok(self.state.code_hash(address)?)
} else {
Ok(None)
}
}

fn extcodesize(&self, address: &Address) -> vm::Result<Option<usize>> {
Expand Down

0 comments on commit 8560755

Please sign in to comment.