Suggestion: Number of assets per node

+1 vote
Hi,

This is more like a suggestion then a question.

If we need to find out number of assets per node, we definitely can sen listassets request and then programmatically iterate over e.g. ArrayList and figure out the size.

But if we are to test performance and specifically test how long does it take to have last node in the blockchain synchronized - having the same number of assets as the e.g. first on in the chain which we used to issue assets, and if we are testing issuing 100.000 or a million assets to the first node, than it is difficult to figure precisely how long it takes for synchronization since every time we send a listassets call to last node, it will take time to retrieve all the nodes, put them in an ArrayList and only then show the value.

The resulting time would definitely be off by more then few seconds.

So, I was wandering if there is a better way to do this type of testing, perhaps an API that I am not aware of or if not, would it be possible to include that type of information in the getinfo call for a node. At least that way we could just extract that info from the getinfo result - would be at least a bit faster and precise.
asked Feb 27, 2016 by nprnic

1 Answer

0 votes

Once the blockchain is synchronized and up-to-date, the number of assets will be synchronized as well. So just use getinfo and look at the blocks value, then you can use getblockhash with the latest height on both nodes to verify they're identical.

answered Feb 28, 2016 by MultiChain
...