Treat empty account the same as non-exist accounts in EIP-1052 (#10775)
This commit is contained in:
parent
6022c47b53
commit
d743df549b
@ -315,7 +315,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>> {
|
fn extcodehash(&self, address: &Address) -> vm::Result<Option<H256>> {
|
||||||
|
if self.state.exists_and_not_null(address)? {
|
||||||
Ok(self.state.code_hash(address)?)
|
Ok(self.state.code_hash(address)?)
|
||||||
|
} else {
|
||||||
|
Ok(None)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extcodesize(&self, address: &Address) -> vm::Result<Option<usize>> {
|
fn extcodesize(&self, address: &Address) -> vm::Result<Option<usize>> {
|
||||||
|
Loading…
Reference in New Issue
Block a user