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)

1 Answer 1

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 agree to our terms of service and acknowledge you have read our privacy policy.

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