forked from cerc-io/laconicd-deprecated
Fix nonce issue for replay attack (#692)
* fix nonce issue for replay attack * fix lint * add to changelog
This commit is contained in:
+1
-1
@@ -257,7 +257,7 @@ func (nvd NonceVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, sim
|
||||
// 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 {
|
||||
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