fix test_helpers -> add a call to accounts_cache.persist

This commit is contained in:
jangko 2020-06-01 11:28:27 +07:00
parent 8a4c8c6273
commit 9cce8d695b
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 5 additions and 0 deletions

View File

@ -149,6 +149,11 @@ proc setupStateDB*(wantedState: JsonNode, stateDB: var AccountsCache) =
stateDB.setCode(account, code)
stateDB.setBalance(account, balance)
# this is an important step when using accounts_cache
# it will affect the account storage's location
# during the next call to `getComittedStorage`
stateDB.persist()
proc verifyStateDB*(wantedState: JsonNode, stateDB: ReadOnlyStateDB) =
for ac, accountData in wantedState:
let account = ethAddressFromHex(ac)