Fix FeeCap estimation

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera
2020-08-07 00:54:58 +02:00
parent 2b2b632cd6
commit f45970a0d5
2 changed files with 12 additions and 5 deletions
+1 -2
View File
@@ -37,8 +37,7 @@ func (a *GasAPI) GasEstimateFeeCap(ctx context.Context, maxqueueblks int64,
increaseFactor := math.Pow(1+1/build.BaseFeeMaxChangeDenom, BaseFeeEstimNBlocks)
out := types.BigMul(parentBaseFee, types.NewInt(uint64(increaseFactor*(1<<8))))
out = types.BigDiv(parentBaseFee, types.NewInt(1<<8))
out = types.BigDiv(out, types.NewInt(1<<8))
return out, nil
}