From 11f0c4b93688191a598090bf4c7b1eb11c1da606 Mon Sep 17 00:00:00 2001 From: librelois Date: Mon, 2 Aug 2021 14:17:13 +0200 Subject: [PATCH] fix(binary search): use gas limit instead of 1 billion for upper bound --- client/rpc/src/eth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/rpc/src/eth.rs b/client/rpc/src/eth.rs index 203077a4bd..4651dce66f 100644 --- a/client/rpc/src/eth.rs +++ b/client/rpc/src/eth.rs @@ -1038,7 +1038,7 @@ where if cfg!(feature = "rpc_binary_search_estimate") { let mut lower = U256::from(21_000); // TODO: get a good upper limit, but below U64::max to operation overflow - let mut upper = U256::from(1_000_000_000); + let mut upper = U256::from(gas_limit); let mut mid = upper; let mut best = mid; let mut old_best: U256;