-
Notifications
You must be signed in to change notification settings - Fork 161
update minimum gas price to be 1 #515
Conversation
Codecov Report
@@ Coverage Diff @@
## development #515 +/- ##
===============================================
- Coverage 72.14% 72.03% -0.11%
===============================================
Files 41 41
Lines 2714 2718 +4
===============================================
Hits 1958 1958
- Misses 613 615 +2
- Partials 143 145 +2
Continue to review full report at Codecov.
|
araskachoi
left a comment
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.
lg2m
fedekunze
left a comment
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.
Thanks, @noot! One minor comment. What was the context for changing the minimum gas price to 1?
| // ValidateBasic implements the sdk.Msg interface. It performs basic validation | ||
| // checks of a Transaction. If returns an error if validation fails. | ||
| func (msg MsgEthereumTx) ValidateBasic() error { | ||
| if msg.Data.Price.Cmp(big.NewInt(0)) == 0 { |
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.
nit, we should add a unit test case
|
|
||
| // ValidateBasic runs stateless checks on the message | ||
| func (msg MsgEthermint) ValidateBasic() error { | ||
| if msg.Price.IsZero() { |
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.
ditto
|
@fedekunze the main reason for this PR was to prepare for a public testnet, since if txs with gasPrice = 0 are accepted, then transactions are free and the network can be spammed. will add some unit tests! |
Closes: #XXX
Description
For contributor use:
docs/) or specification (x/<module>/spec/)godoccomments.Unreleasedsection inCHANGELOG.mdFiles changedin the Github PR explorerFor admin use:
WIP,R4R,docs, etc)