From 2aba16e2c9de358bf1aab4113321eeecc8227305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 9 Sep 2020 11:41:02 +0200 Subject: [PATCH] gas: Fix median calc --- node/impl/full/gas.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/impl/full/gas.go b/node/impl/full/gas.go index 2aa8a39ca..a3496cbd7 100644 --- a/node/impl/full/gas.go +++ b/node/impl/full/gas.go @@ -102,8 +102,8 @@ func (a *GasAPI) GasEstimateGasPremium(ctx context.Context, nblocksincl uint64, for _, price := range prices { prev1, prev2 = price.price, prev1 at -= price.limit - if at > 0 { - continue + if at < 0 { + break } }