From 84ce5af2b0bc4d1247c947690ef6bd4fbbeafd6a Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 24 Jun 2016 11:40:25 +0200 Subject: [PATCH] max/min incorrect --- ethcore/src/ethereum/ethash.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index dc8dd5482..3400220db 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -122,7 +122,7 @@ impl Engine for Ethash { } else if gas_limit > gas_ceil_target { max(gas_ceil_target, gas_limit - gas_limit / bound_divisor + 1.into()) } else { - max(gas_ceil_target, + min(gas_ceil_target, max(gas_floor_target, gas_limit - gas_limit / bound_divisor + 1.into() + (header.gas_used * 6.into() / 5.into()) / bound_divisor))