Reputation: 485
I am using the Cosmos SDK and run into an issue creating new transactions.
I get the following error when I try to create a transaction with the CLI:
account sequence mismatch, expected 3787, got 3786: incorrect account sequence
This is on the cosmoshub-testnet
, using the Cosmos SDK version from https://github.com/b-harvest/gravity-dex which mentions
github.com/tendermint/tendermint v0.34.10
github.com/cosmos/cosmos-sdk v0.42.5
module github.com/cosmos/gaia/v4
go 1.16
I do not know why this happened or how to resolve. Any help is appreciated.
Upvotes: 2
Views: 7281
Reputation: 31
This generally happens when any of your past trxs get stuck and that is not being processed because of any reason. The common one is related to gas. As Black Bob correctly pointed out you can pass --sequence
flag with the latest account sequence + 1.
To avoid this issue i usually try to simulate before submitting it to chain.
Upvotes: 0