Skip to content

Commit

Permalink
fix(binary search): use gas limit instead of 1 billion for upper bound (
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois authored Aug 2, 2021
1 parent 03a81c1 commit a207dc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/rpc/src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a207dc5

Please sign in to comment.