evm: fix EndBlock panic (#51)

This commit is contained in:
Federico Kunze
2021-05-27 05:26:01 -04:00
committed by GitHub
parent 73dac6f5b1
commit 0805bf80e5
4 changed files with 8 additions and 41 deletions
+1
View File
@@ -45,6 +45,7 @@ func (k Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.Valid
// Gas costs are handled within msg handler so costs should be ignored
ctx = ctx.WithGasMeter(sdk.NewInfiniteGasMeter())
k.CommitStateDB.WithContext(ctx)
k.WithContext(ctx)
// Update account balances before committing other parts of state
k.CommitStateDB.UpdateAccounts()