Fix engine_sim compilation issue (#2594)

This commit is contained in:
andri lim 2024-09-06 11:06:31 +07:00 committed by GitHub
parent 0a80a3bb25
commit a70bb78d27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -81,7 +81,7 @@ proc getVmState(c: ChainRef, header: BlockHeader):
return ok(c.vmState) return ok(c.vmState)
let vmState = BaseVMState() let vmState = BaseVMState()
if not vmState.init(header, c.com, storeSlotHash = storeSlotHash): if not vmState.init(header, c.com, storeSlotHash = false):
debug "Cannot initialise VmState", debug "Cannot initialise VmState",
number = header.number number = header.number
return err() return err()
@ -131,7 +131,8 @@ proc setBlock*(c: ChainRef; blk: EthBlock): Result[void, string] =
# the parent state of the first block (as registered in `headers[0]`) was # the parent state of the first block (as registered in `headers[0]`) was
# the canonical state before updating. So this state will be saved with # the canonical state before updating. So this state will be saved with
# `persistent()` together with the respective block number. # `persistent()` together with the respective block number.
c.db.persistent(header.number - 1) c.db.persistent(header.number - 1).isOkOr:
return err($error)
ok() ok()