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:
1 parent
0fa75ba080
commit
d54663c0b8
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user