forked from cerc-io/laconicd-deprecated
ante: update nonce check (#550)
This commit is contained in:
+4
-1
@@ -253,7 +253,10 @@ func (nvd NonceVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, sim
|
||||
}
|
||||
|
||||
seq := acc.GetSequence()
|
||||
if msgEthTx.Data.AccountNonce != seq {
|
||||
// if multiple transactions are submitted in succession with increasing nonces,
|
||||
// all will be rejected except the first, since the first needs to be included in a block
|
||||
// before the sequence increments
|
||||
if msgEthTx.Data.AccountNonce < seq {
|
||||
return ctx, sdkerrors.Wrapf(
|
||||
sdkerrors.ErrInvalidSequence,
|
||||
"invalid nonce; got %d, expected %d", msgEthTx.Data.AccountNonce, seq,
|
||||
|
||||
Reference in New Issue
Block a user