2

i'm trying to promote a transaction by using the following code

const spamTransfer = [{address: '9'.repeat(81), value: 0, message: '', tag: ''}]
iota.promoteTransaction(hash, 10, 9, spamTransfer, {interrupt: false, delay: 0});

but i receive this error

Transaction is inconsistent. Reason: tails are not consistent (would lead to inconsistent ledger state or below max depth)

2

You should check if the transaction is promotable before trying to promote it. For that transaction, isPromotable will return false, since it approves one or more transactions that are inconsistent (would be doublespends or reattaches of already confirmed transactions). When you try to promote it, chances are high that the promotion transaction will pick a milestone as second tip which already confirms the "other" transaction. As a result, your new transaction would not be confirmable either and therefore is rejected by the network.

If that happens, you will have to reattach the transaction instead. After reattaching, try to promote the new transaction, not the old one.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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