fix buggy isAlive from accounts_cache

This commit is contained in:
jangko 2020-06-01 10:54:25 +07:00
parent 71514a0a66
commit 8a4c8c6273
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 2 additions and 7 deletions

View File

@ -145,13 +145,8 @@ proc isEmpty(acc: RefAccount): bool =
acc.account.balance.isZero and
acc.account.nonce == 0
proc exists(acc: RefAccount): bool =
if IsAlive notin acc.flags:
return false
if IsClone in acc.flags:
result = true
else:
result = IsNew notin acc.flags
template exists(acc: RefAccount): bool =
IsAlive in acc.flags
template createTrieKeyFromSlot(slot: UInt256): auto =
# XXX: This is too expensive. Similar to `createRangeFromAddress`