Getting a list of items from a stream in a single step [closed]

+2 votes

I submit some items to a stream with the same key value. When I want to retrieve them, I can do so by iterating over the list returned by liststreamkeyitems(myStream, myKey). However, as I said this requires iterating over each item and getting their data field individually.

Is it possible to fetch all the items I submitted in a list in a single step instead so I can speed up the process?

closed with the note: Figured it out.
asked Aug 30, 2018 by TinfoilHat
closed Aug 31, 2018 by TinfoilHat

1 Answer

+1 vote

I'm not sure what you mean, since liststreamkeyitems returns all the information you need in a single list, and its your application iterating over that list which cannot be avoided.

But perhaps the issue is that some of the items are too large for the current maxshowndata parameter, so you need to call gettxoutdata separately. If so this can be fixed easily using setruntimeparam to change the maxshowndata value, or one of the other methods described here:

https://www.multichain.com/developers/runtime-parameters/

answered Aug 31, 2018 by MultiChain
...