1

I am writing a script that relies on txid to perform some tasks. I was wondering if it is possible for the txid to be missing from a transaction.

2 Answers 2

3

A txid is calculated from the transaction data by hashing the transaction (excluding the witness). It's not part of the transaction, but rather derived from the transaction. You can rely on it being available for every transaction.

6

Txid can’t be missing since it’s just a hash of the transaction data

1
  • 1
    Note that it isn't a "field" on the transaction either, it isn't explicitly given. You have to hash the transaction yourself to get the ID. Jan 13, 2022 at 10:33

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.