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

Fix call/estimate_gas #4121

Merged
merged 2 commits into from
Jan 11, 2017
Merged

Fix call/estimate_gas #4121

merged 2 commits into from
Jan 11, 2017

Conversation

gavofyork
Copy link
Contributor

(work around for #4120)

@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. M6-rpcapi 📣 RPC API. A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jan 10, 2017
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 7b93fc9 on fix-est into ** on master**.

@@ -673,6 +673,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where
let signed = self.sign_call(request)?;
take_weak!(self.client).estimate_gas(&signed, num.0.into())
.map(Into::into)
.or_else(|_| Ok(0.into()))
.map_err(errors::from_call_error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map_err is now dead code -- should just be unwrap_or(0.into())

@gavofyork gavofyork changed the title Return 0 instead of error with out of gas on estimate_gas Fix call/estimate_gas Jan 11, 2017
@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Jan 11, 2017
@keorn keorn added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jan 11, 2017
@gavofyork gavofyork merged commit 7286d42 into master Jan 11, 2017
@gavofyork gavofyork deleted the fix-est branch January 11, 2017 13:28
arkpar pushed a commit that referenced this pull request Jan 11, 2017
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.
gavofyork pushed a commit that referenced this pull request Jan 11, 2017
* Ignore get_price_info test by default. (#4112)

* Auto-detect hex encoded bytes in sha3 (#4108)

* Auto-detect hex encoded bytes in sha3

* Using types/isHex

* Removing unused imports

* Use binary chop to estimate gas accurately (#4100)

* Initial sketch.

* Building.

* Fix a few things.

* Fix issue, add tracing.

* Address grumbles

* Raise upper limit if needed

* Fix test.

* Fixing decoding API with signatures in names (#4125)

* Fix call/estimate_gas (#4121)

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

* Fix stuff up.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M6-rpcapi 📣 RPC API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants