From 54e060f0943181a7aec67e154f3bf7f88cae111d Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Fri, 11 Aug 2023 21:01:00 +0200 Subject: [PATCH] fix incorrect equality condition is HasAccount --- core/types/state_account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/state_account.go b/core/types/state_account.go index 75c188fea2..0cb751685a 100644 --- a/core/types/state_account.go +++ b/core/types/state_account.go @@ -60,7 +60,7 @@ func (acct *StateAccount) Copy() *StateAccount { // HasStorage returns true if the account has a non-empty storage tree. func (acc *StateAccount) HasStorage() bool { - return len(acc.Root) == 32 && acc.Root == EmptyRootHash + return len(acc.Root) == 32 && acc.Root != EmptyRootHash } // SlimAccount is a modified version of an Account, where the root is replaced