Skip to content

x/feemarket: fetch maximum block gas from context instead of consensus param keeper #162

Open
@tbruyelle

Description

@tbruyelle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions