From 7286d42b7d8d8f10004ec083be5f25dcccb17693 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 11 Jan 2017 14:28:27 +0100 Subject: [PATCH] Fix call/estimate_gas (#4121) * Return 0 instead of error with out of gas on estimate_gas * Fix stuff up. --- ethcore/src/client/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index d391ef92d..58dfdbb0c 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -848,7 +848,7 @@ impl BlockChainClient for Client { difficulty: header.difficulty(), last_hashes: last_hashes, gas_used: U256::zero(), - gas_limit: header.gas_limit(), + gas_limit: U256::max_value(), }; // that's just a copy of the state. let mut state = self.state_at(block).ok_or(CallError::StatePruned)?; @@ -883,7 +883,7 @@ impl BlockChainClient for Client { difficulty: header.difficulty(), last_hashes: last_hashes, gas_used: U256::zero(), - gas_limit: header.gas_limit(), + gas_limit: U256::max_value(), }; // that's just a copy of the state. let mut original_state = self.state_at(block).ok_or(CallError::StatePruned)?;