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:
parent
2edd893f23
commit
7286d42b7d
@ -848,7 +848,7 @@ impl BlockChainClient for Client {
|
|||||||
difficulty: header.difficulty(),
|
difficulty: header.difficulty(),
|
||||||
last_hashes: last_hashes,
|
last_hashes: last_hashes,
|
||||||
gas_used: U256::zero(),
|
gas_used: U256::zero(),
|
||||||
gas_limit: header.gas_limit(),
|
gas_limit: U256::max_value(),
|
||||||
};
|
};
|
||||||
// that's just a copy of the state.
|
// that's just a copy of the state.
|
||||||
let mut state = self.state_at(block).ok_or(CallError::StatePruned)?;
|
let mut state = self.state_at(block).ok_or(CallError::StatePruned)?;
|
||||||
@ -883,7 +883,7 @@ impl BlockChainClient for Client {
|
|||||||
difficulty: header.difficulty(),
|
difficulty: header.difficulty(),
|
||||||
last_hashes: last_hashes,
|
last_hashes: last_hashes,
|
||||||
gas_used: U256::zero(),
|
gas_used: U256::zero(),
|
||||||
gas_limit: header.gas_limit(),
|
gas_limit: U256::max_value(),
|
||||||
};
|
};
|
||||||
// that's just a copy of the state.
|
// that's just a copy of the state.
|
||||||
let mut original_state = self.state_at(block).ok_or(CallError::StatePruned)?;
|
let mut original_state = self.state_at(block).ok_or(CallError::StatePruned)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user