feemarket: update base fee in BeginBlock (#822)

* Update base fee in begin blocker

Closes: #820

* changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
yihuang
2021-12-15 02:10:52 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent 5d237a5ee4
commit 50e463725e
7 changed files with 16 additions and 9 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import (
)
// CalculateBaseFee calculates the base fee for the current block. This is only calculated once per
// block during EndBlock. If the NoBaseFee parameter is enabled or below activation height, this function returns nil.
// block during BeginBlock. If the NoBaseFee parameter is enabled or below activation height, this function returns nil.
// NOTE: This code is inspired from the go-ethereum EIP1559 implementation and adapted to Cosmos SDK-based
// chains. For the canonical code refer to: https://github.com/ethereum/go-ethereum/blob/master/consensus/misc/eip1559.go
func (k Keeper) CalculateBaseFee(ctx sdk.Context) *big.Int {