deso-protocol/deso-workspace

"getHotFeeds" Post class method returns more responses than the response limit specified

jaytecch opened this issue · 1 comments

The "getHotFeeds" Post class method returns more responses than what has been specified in the "ResponseLimit" field of the request object. For example, when I set the "ResponseLimit" to 1.
I get 5 responses i.e 5 hot feeds instead of 1.

This is my request
Screenshot_20220724-005450_1

This is what I get
Screenshot_20220724-005517_1

Everything works fine, if the "ResponseLimit" is set to 0, as nothing would be returned as expected but when the "ResponseLimit" is set to any negative integer such as -1. A response is returned which could contain 3 - 5 hot feed depending on the negative value.

Here's an example where the "ResponseLimit" is set to -400.
Screenshot_20220724-010848_1

Still I get a response containing 3 hot feed
Screenshot_20220724-011205_1

Not an issue with the library as all it does it pass the parameter forward to the backend api. You can find implementation details for the hotfeed here https://github.com/deso-protocol/backend/blob/main/routes/hot_feed.go#L968. Looking at your inputs I was not able to recreate those issues so my assumption is the node wasn't correctly returning values at that time.