Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix call/estimate_gas (#4121)
Browse files Browse the repository at this point in the history
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.
  • Loading branch information
gavofyork authored Jan 11, 2017
1 parent 2edd893 commit 7286d42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down Expand Up @@ -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)?;
Expand Down

0 comments on commit 7286d42

Please sign in to comment.