Open
Description
Currently the maximum block gas, used to compute the target block gas, is fetched from the imported ConsensusParamsKeeper
from the x/consensus
module.
But this import is actually not required since the max block gas is also available in the passed context via the block gas meter. Furthermore, the maximum block gas inside the block gas meter use an additional logic compared to the ConsensusParamsKeeper
, defined inside baseapp.GetMaximumBlockGas()
, which turns a -1
value into 0
.
For this reason I think it matters to replace the usage of ConsensParamsKeeper
by ctx.BlockGasMeter().Limit()
, this removes a dependency to the x/consensus
module, and it follows a better logic.