Open shortthefomo opened 3 years ago
Good morning @lathanbritz, thanks for opening an issue.
Are you using a BroadcastClient
or a Client
?
Client not played with the BroadcastClient yet
This error is thrown in submitAndWait()
when the transaction has not been validated before ledger with ledger_index < LastLedgerSequence
.
From your stack trace, you likely have a pending submitAndWait()
that is throwing this error. I don't think that the code snippet you provided should throw that error.
That pointed me in the right direction thank you. I had x2 async functions firing the submitAndWait() that were not waiting for the responses hence they could fire in any order and caused the out of sequence error.
Basically i need to wait for the response of submitAndWait and cant simply fire X of those requests off and forget about them.
Important note here is this is a slow process. ~3sec response.
Is there a submitAndWait for a batch of TX's? Say i had x5 OfferCreate transactions I wanted to append.
Such a function does not currently exist, but it's a great feature request. The trick is that you'll need to set up the sequence numbers correctly, which requires additional logic and error handling.
This would be good as a new snippet. After more extensive testing, it could be added as a new method on Client
, or even just a separate utility function.
In case it's useful, there's a more thorough version of "submit and wait" here: https://github.com/XRPLF/xrpl-dev-portal/blob/master/content/_code-samples/submit-and-verify/submit-and-verify2.js
This should be adapted into a snippet as well.
@khancode will this be covered by #2149?
@khancode will this be covered by #2149?
@ckniffen Yes, that's goal of my PR.
auto sequence not functioning
Some times this gets a valid response other times this returns a faulty sequence. My guess here is that I am also firing off other transactions that increment the sequence number async and this causes the sequence number issues.