2

Assume the sequence number of an account on the ledger is 5. An incoming transaction contains a bump sequence operation, to bump to 10. The sequence number to be included in the transaction should be the sequence number on the ledger + 1.

Since we are bumping the sequence to 10, why not include 9 as the sequence number in the incoming transaction? What is the logic behind ledger sequence number + 1? I tried providing 9 and the transaction failed with a bad_seq error.

3

There are two different concepts here.

The first is the sequence number of a transaction. To be valid, this must always be one greater than the current sequence number of the account. It doesn't matter what the contents of the transaction is - it has to have a valid sequence number.

The second is the bump sequence operation. When successful, it will update the account sequence number on the ledger to the new value. On the next transaction, the new value + 1 will be required to be valid.

So the answer to your question is that it wouldn't make sense to set "9" as the sequence number, since until the operation succeeds, the next valid sequence number is "6". After the operation succeeds, the next valid sequence number will be "11".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.