forked from cerc-io/laconicd-deprecated
evm: fix infinite context usage on EndBlock
(#329)
The previous code is not incorrect since the method `SetBlockBloom` use the `ctx` passed in rather than the `k.ctx`. It's confusing that sometimes methods use ctx in parameter, sometimes use `k.ctx`, but that's another issue. Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
parent
0fa75ba080
commit
d54663c0b8
@ -29,7 +29,7 @@ func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.Vali
|
||||
|
||||
// Gas costs are handled within msg handler so costs should be ignored
|
||||
infCtx := ctx.WithGasMeter(sdk.NewInfiniteGasMeter())
|
||||
k.WithContext(ctx)
|
||||
k.WithContext(infCtx)
|
||||
|
||||
k.SetBlockBloom(infCtx, req.Height, ethtypes.BytesToBloom(k.GetBlockBloomTransient().Bytes()))
|
||||
k.WithContext(ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user