-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R4R: Change --gas=0 semantic and introduce --gas=simulate #2306
Conversation
6f48ddb
to
6c896df
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2306 +/- ##
===========================================
+ Coverage 63.94% 63.95% +<.01%
===========================================
Files 140 140
Lines 8689 8688 -1
===========================================
Hits 5556 5556
+ Misses 2757 2756 -1
Partials 376 376 |
Make --gas flag accept a conventional "simulate" string value in addition to integers. Passing --gas=simulate would trigger the tx simulation and set the gas according to the gas estimate returned by the simulation. Any other integer value passed to --gas would be interpreted as-is and and set as gas wanted value. Closes: #2300
94ab5f9
to
ceba51a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Left some comments with some test cases that are missing.
Also I think we should change the gas type to uint
. Auditors have rise that concern a couple times already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK -- left some general feedback. Also, broken lint
CI needs to be addressed...not sure what is going on there.
Appreciated, thanks!
…On Tue, Sep 11, 2018 at 6:59 PM, Dev Ojha ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In client/flags.go
<#2306 (comment)>:
> }
return cmds
}
+
+// Gas flag parsing functions
+
+// GasSetting encapsulates the possible values passed through the --gas flag.
+type GasSetting struct {
+ Simulate bool
+ Gas int64
#2173 <#2173>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2306 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN_7JTPPZLubTQXq4__HPcO1q5jLn7Fks5uZ_ofgaJpZM4WjHzo>
.
--
Alessio Treglia | alessio@tendermint.com
0416 0004 A827 6E40 BB98 90FB E8A4 8AE5 311D 765A
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
untestedACK and on latest develop 👍
Make --gas flag accept a conventional "simulate" string value in addition
to integers. Passing --gas=simulate would trigger the tx simulation and
set the gas according to the gas estimate returned by the simulation.
Any other integer value passed to --gas would be interpreted as-is and
and set as gas wanted value.
Closes: #2300
docs/
)PENDING.md
with issue #Files changed
in the github PR explorerFor Admin Use: