1

I have created one multisig account with two co-signers. After that, I initiated two transactions back to back without signing using co-signers.

Tx1 10XLM – pending and Tx2 10XLM – pending.

Now, I tried to sign the Tx1 using co-signers. But i couldn't do that. It's throwing error as tx_bad_seq. Then I checked the seq.no for both transaction. It is same.

Then again created one transaction and successfully signed the transaction using co-signers.

Please help me out.

2

tx_bad_seq error means that current source account sequence doesn't match the sequence specified in the transaction itself. Tx sequence should be equal to account sequence + 1 to pass the verification.

The account sequence is effectively a "nonce" intended to prevent transaction replay. It is incremented after each transaction. Failed transactions (for example, sending an asset without a trustline or submitting an invalid offer) also increment sequence for the source account.

Your second tx was applied successfully because you fetched current account sequence with something like horizon.loadAccount(address) before creating new transaction. The transaction builder uses this information to set a proper sequence for the transaction.

  • in my query, i have created three transaction. While am trying to sign the 1st two transaction which were in pending, its failing. but i can able to create and sign the third transaction. anyways, am using server.loadaccount(address) before creating new transaction – viswa Dec 17 '18 at 11:44
  • A transaction will fail unless tx sequence number strictly equals current account sequence + 1. Multisignature have nothing to do with this. You created a tx, then submitted some other transactions on behalf of the source account, so the first tx became invalid. – Orbit Lens Dec 17 '18 at 12:00
  • even second transaction also fail. i can sign only third transaction – viswa Dec 17 '18 at 12:05

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.