From c9fdd4bee279a05d9364ca4ef71dfb1683ac6ed4 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Tue, 18 Aug 2020 17:40:53 +0200 Subject: [PATCH] Fix testgrounds build Signed-off-by: Jakub Sztandera --- build/params_testground.go | 3 +++ chain/store/basefee.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build/params_testground.go b/build/params_testground.go index ffd5ac9a4..bdd56fbb1 100644 --- a/build/params_testground.go +++ b/build/params_testground.go @@ -66,4 +66,7 @@ var ( // Actor consts // TODO: Pull from actors when its made not private MinDealDuration = abi.ChainEpoch(180 * builtin.EpochsInDay) + + PackingEfficiencyNum int64 = 4 + PackingEfficiencyDenom int64 = 5 ) diff --git a/chain/store/basefee.go b/chain/store/basefee.go index 3873f3945..de3f90a8f 100644 --- a/chain/store/basefee.go +++ b/chain/store/basefee.go @@ -17,7 +17,7 @@ func computeNextBaseFee(baseFee types.BigInt, gasLimitUsed int64, noOfBlocks int // nextBaseFee = baseFee + change // nextBaseFee = max(nextBaseFee, build.MinimumBaseFee) - delta := build.PackingEfficiencyDenom * gasLimitUsed / int64(noOfBlocks*build.PackingEfficiencyNum) + delta := build.PackingEfficiencyDenom * gasLimitUsed / (int64(noOfBlocks) * build.PackingEfficiencyNum) delta -= build.BlockGasTarget // cap change at 12.5% (BaseFeeMaxChangeDenom) by capping delta