feat: fee market module (#491)

* feat: fee market module

* update proto

* queriers: CLI + gRPC

* gov params

* genesis

* enable height

* fixes

* fix app
This commit is contained in:
Federico Kunze Küllmer
2021-08-26 10:08:11 +00:00
committed by GitHub
parent 4b11ac66c4
commit f469db94ef
34 changed files with 3544 additions and 647 deletions
-15
View File
@@ -1,7 +1,6 @@
package keeper
import (
"fmt"
"time"
abci "github.com/tendermint/tendermint/abci/types"
@@ -30,20 +29,6 @@ func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.Vali
infCtx := ctx.WithGasMeter(sdk.NewInfiniteGasMeter())
k.WithContext(infCtx)
baseFee := k.CalculateBaseFee(ctx)
// only set base fee if the NoBaseFee param is false
if baseFee != nil {
k.SetBaseFee(ctx, baseFee)
k.SetBlockGasUsed(ctx)
k.Ctx().EventManager().EmitEvent(sdk.NewEvent(
"block_gas",
sdk.NewAttribute("height", fmt.Sprintf("%d", ctx.BlockHeight())),
sdk.NewAttribute("amount", fmt.Sprintf("%d", ctx.BlockGasMeter().GasConsumedToLimit())),
))
}
bloom := ethtypes.BytesToBloom(k.GetBlockBloomTransient().Bytes())
k.SetBlockBloom(infCtx, req.Height, bloom)