Fix call/estimate_gas (#4121)

* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.
This commit is contained in:
Gav Wood 2017-01-11 14:28:27 +01:00 committed by GitHub
parent 2edd893f23
commit 7286d42b7d

View File

@ -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)?;