mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
fix: Ensure Exist method returns true for self-destructed accounts
This commit is contained in:
parent
a7f9523ae1
commit
8bf7433d58
1 changed files with 1 additions and 1 deletions
|
|
@ -294,7 +294,7 @@ func (s *StateDB) SubRefund(gas uint64) {
|
||||||
// Exist reports whether the given account address exists in the state.
|
// Exist reports whether the given account address exists in the state.
|
||||||
// Notably this also returns true for self-destructed accounts.
|
// Notably this also returns true for self-destructed accounts.
|
||||||
func (s *StateDB) Exist(addr common.Address) bool {
|
func (s *StateDB) Exist(addr common.Address) bool {
|
||||||
return s.getStateObject(addr) != nil
|
return s.getStateObject(addr) != nil || s.stateObjectsDestruct[addr] != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Empty returns whether the state object is either non-existent
|
// Empty returns whether the state object is either non-existent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue