forked from cerc-io/laconicd-deprecated
evm: update msgs to accept zero gas price (#299)
* update keeper to accept gas price=0; default pending to latest * cleanup * more cleanup * more cleanup * more cleanup * more cleanup * ante: copy IncrementSequenceDecorator from SDK's AnteHandler * improve bloom test * lint * update msg error Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze
Federico Kunze
parent
51b68d7512
commit
1f63ddfe96
+4
-4
@@ -76,8 +76,8 @@ func (msg MsgEthermint) GetSignBytes() []byte {
|
||||
|
||||
// ValidateBasic runs stateless checks on the message
|
||||
func (msg MsgEthermint) ValidateBasic() error {
|
||||
if msg.Price.Sign() != 1 {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidValue, "price must be positive %s", msg.Price)
|
||||
if msg.Price.Sign() == -1 {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidValue, "price cannot be negative %s", msg.Price)
|
||||
}
|
||||
|
||||
// Amount can be 0
|
||||
@@ -175,8 +175,8 @@ func (msg MsgEthereumTx) Type() string { return TypeMsgEthereumTx }
|
||||
// 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.Sign() != 1 {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidValue, "price must be positive %s", msg.Data.Price)
|
||||
if msg.Data.Price.Sign() == -1 {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidValue, "price cannot be negative %s", msg.Data.Price)
|
||||
}
|
||||
|
||||
// Amount can be 0
|
||||
|
||||
Reference in New Issue
Block a user