stellar / go

Stellar's public monorepo of go code
https://stellar.org/developers
Apache License 2.0
1.3k stars 499 forks source link

Trades for account endpoint: pagination doesn't work #530

Closed VicMikhailau closed 6 years ago

VicMikhailau commented 6 years ago

Hello,

Paginations seems to be broken. I'm trying to get first page of trades with link above: https://horizon.stellar.org/accounts/GBERMYIQQ6IRI32MCK3CA4VMIWVQTV7UUWGNOZQKIIZYCZAQLFMNGVJZ/trades?limit=2&order=desc

Here is two objects having ids: 80887428323221505-2, 80882768283774977-2.

and link to next page: https://horizon.stellar.org/accounts/GBERMYIQQ6IRI32MCK3CA4VMIWVQTV7UUWGNOZQKIIZYCZAQLFMNGVJZ/trades?cursor=80882768283774977-2&limit=2&order=desc

The next objects presented on page: 80882768283774977-2 and 80882768283774977-1. Firstly, one overlapped with previous page.

and then next page https://horizon.stellar.org/accounts/GBERMYIQQ6IRI32MCK3CA4VMIWVQTV7UUWGNOZQKIIZYCZAQLFMNGVJZ/trades?cursor=80882768283774977-1&limit=2&order=desc

there are exactly same objects as for page 2. Additionaly, self and next are same, so we are unable to go next, while there should be totally 9 objects.

Thanks.

tomerweller commented 6 years ago

This is fixed in master (https://github.com/stellar/go/pull/492 ) but has not made it to a release yet

roman-karpovich commented 6 years ago

@tomerweller i'd faced with same issue. when it is going to be released?

tomerweller commented 6 years ago

A new release should be out and pushed to testnet by next week

VicMikhailau commented 6 years ago

@tomerweller Tested on https://horizon-testnet.stellar.org/:


  "core_version": "stellar-core 9.2.0rc6 (b0923f153b86d394a83b2a619db6b23f07ed0700)",
  "history_latest_ledger": 10284024,
  "history_elder_ledger": 1,
  "core_latest_ledger": 10284024,
  "network_passphrase": "Test SDF Network ; September 2015",
  "protocol_version": 9```

Not fixed issue.