hyle-team / zano

Confidential, Secure, Easy-to-Use
https://zano.org
Other
112 stars 63 forks source link

Fix blockchain_storage::get_assets() to correctly enforce limit of count items #441

Closed OrsonJ closed 4 months ago

OrsonJ commented 5 months ago

The get_asset_list daemon API method only returns one asset regardless of the value passed in the count paramater.

The problem seems to be the if (i + count > offset) condition. This code fixed it for me, but I'm no C++ dev so it can probably be done better.

cryptozoidberg commented 4 months ago

@OrsonJ are you in c++ coding now?

OrsonJ commented 4 months ago

Nah, full credit to ChatGPT. ;)