Bitcoin

Is an index or short transaction ID sent in the getblocktxn message?

After reading BIP152, Short Transaction ID is cmpct block message. Depending on whether the transaction is SegWit or non-SegWit, the WTXID or TXID is used to calculate the short-term transaction ID. What isn’t clear to me is getblocktxn Does meesage use an index of the transaction or does it use this short transaction ID?

The BIP states that the getblocktxn message uses the following structure:

Enter image description here

The index is transferred based on that structure.

However, a note about version 2:

The short transaction ID sent in cmpctblock messages and getblocktxn messages is calculated using the same process as version 1, but instead of txid, it uses wtxid as defined in BIP 141.

it’s clear to me cmpctmessageHowever, it states that Short Transaction ID is also used in: getblocktxn message?

Related Articles

Back to top button