Descending order when using listblocks {range}

+2 votes

When i use listblocks and i specify a range of blocks to look at, i get it in ascending order. I would have thought this would be in descending order so that its easier to process/view at runtime? Also it would be more helpful in descending order as that would show the latest confirmed block in the list first rather than last.

This could be a performance bottleneck when dealing with large amounts of data.

Any ideas if that would be possible in the future perhaps?

asked Aug 3, 2017 by RobertJ

1 Answer

+1 vote
In general the ordering of the API responses is fixed, because this is so easy to solve at the application level. Depending on the language you are using to connect to the API, just traverse the returned array in reverse order, or use an array reversing function.
answered Aug 3, 2017 by MultiChain
...