I am trying to send multiple TX’s via my own module in Cosmos, all signed by the same account. I am using the CLI to do so.
The challenge I am running into is that if I do these all in quick succession in a script, they don’t all successfully get through.
I am pretty sure that there is a need to wait for some time for the node to which I am sending the TX to, to do some work (perhaps CheckTx) before I can send another TX signed by the same account. I think it is related to the fact that CheckTx for TX1 has to complete before TX2 can be sent, for example.
But how do I know when it is safe to send TX2? What can I do with the CLI to be sure it is safe and that TX2 will successfully get executed?
I thought that checking for a change in the sequence # for the signing account would be enough… that when I saw the change, that is the signal to send the next one. But I do not think that worked.