Same data in multiple streams

+1 vote

Hi,

I have a question about writing same data into multiple streams.

I know I can write same data into multiple streams in one transaction. Every vout of the transaction contains 

the same data. The data is duplicated many times in that transaction.

Is there any way to write the data only once, but still publishing it to multiple streams? 

Thanks in advance.

asked Jul 25 by hagen_m

1 Answer

+1 vote
 
Best answer

I'm afraid this is not currently possible, since it's not supported at the transaction format level. I can recommend two options here:

  • Use one stream for actually writing the data, and no other purpose. When you build a transaction, write the actual data to that one stream, and write empty data to the other streams in the same transaction. All those stream items will share the same txid so you can use getstreamitem to retrieve the item from the first stream after finding that txid from listing the other stream items.
  • If you're using MultiChain 2.0 (alpha) consider using item keys rather than separate streams to organize the information. In this case you can give a single item multiple keys and retrieve it under any of them.
answered Jul 26 by MultiChain
selected Aug 1 by hagen_m
...