Post
Topic
Board Development & Technical Discussion
Re: Can TXID be caculated before TX commited?
by
kfreds
on 18/05/2013, 14:38:21 UTC
Hello all!
Is TXID predictable before transaction broadcast to peers?
Or in other words,can someone choose a certain txid he want when broadcast a transaction?

Hi!

Yes, it's a hash based on the content of the transaction. See the bitcoin wiki or this question:
http://bitcoin.stackexchange.com/questions/2859/how-are-transaction-hashes-calculated

The answer to the second question is no. Furthermore that would be an undesirable feature of a hash function. See "preimage attack".