How to txid

+1 vote
Dear,

Using Multichain-2.0 alpha 4.

I have several validated transactions related to items published on data stream and I would like to know how to track a particular transaction (knowing its txid) to go back to the previous related one?

Thank you for your answers.
asked Sep 8 by anonymous

1 Answer

0 votes

I'm afraid there isn't currently a way to get the position of a particular stream item from its txid, in order to calculate the position of the previous stream item. Your closest approximation is to use the following method:

  1. Use getstreamitem with verbose=true to get the blockhash of the block in which the first item appears.
  2. Use liststreamblockitems to get all stream items from that same block, and find the one that is prior to the one whose txid you know.
  3. If that was the first stream item in the block, get the height of the block you tried using getblock, then keep trying earlier blocks (with liststreamblockitems) until you find the previous item.
answered Sep 10 by MultiChain
...