inputsAlreadySpent

fun Transaction.inputsAlreadySpent(irrevocablySpent: Map<OutPoint, Transaction>): Boolean

This helper function tells if the utxos consumed by the given transaction has already been irrevocably spent (possibly by this very transaction)

It can be useful to:

  • not attempt to publish this tx when we know this will fail

  • not watch for confirmations if we know the tx is already confirmed

  • not watch the corresponding utxo when we already know the final spending tx

Return

true if we know for sure that the utxos consumed by the tx have already irrevocably been spent, false otherwise

Parameters

irrevocablySpent

a map of known spent outpoints