lbryio / lbryio/lbry-sdk

purchase list doesn't resolve properly sometimes with page size over 10?

Open
#2,964 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Python
Stars
7.2k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

Not sure what causes this, but 10 or less seems to be a sweet spot. If you use 20, you get something like this: ```
{
"jsonrpc": "2.0",
"result": {
"items": [
{
"address": "bJZFx7YG1fFHUxPxG4kZUXgHxPiAKTUomU",
"amount": "10.0",
"claim_id": "cbd52f2e307f528eb888071aa392d7a6f89bfad5",
"confirmations": 0,
"height": 0,
"nout": 0,
"timestamp": null,
"txid": "3e3c98836a96d3d4a75afe7cf9cef208aca235cf13ee983b3cad2cddefcf781b",
"type": "purchase"
},
{
"address": "bNhDNN2pFvr3dYVAEHsEwnodbQLoXi9Cwy",
"amount": "1.0",
"claim_id": "aba72caac9d392acd5150707ad788b4ac3df9904",
"confirmations": 12,
"height": 768081,
"nout": 0,
"timestamp": 1590078548,
"txid": "1d3d78f714ed9f97b88e750a59cf6bf50cb7ba4ea9ed3a60c9016bce962d2ce1",
"type": "purchase"
},
{
"address": "bWgFMEFA1JeXS1TBcLcDV87CNMtTRsh831",
"amount": "11.0",
"claim": {
"address": "bWgFMEFA1JeXS1TBcLcDV87CNMtTRsh831",
"amount": "0.1",
"canonical_url": "lbry://@juggling#1/couple-acrobatics-malabarize-se#8",
"claim_id": "8306a0da6d5e5dc2469751605baa41ff9aab65b7",
"claim_op": "create",
"confirmations": 507,
"height": 767586,
"is_channel_signature_valid": true,
"meta": {
"activation_height": 767586,
"creation_height": 767586,
"creation_timestamp": 1589999507,
"effective_amount": "4002.1",
"expiration_height": 2869986,
"is_controlling": true,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reproducing the purchase-list request with a page size of 20 and compare it with a request using 10 or less; trace the RPC response path to identify where the larger result becomes invalid. Done means purchase lists resolve correctly for page sizes above 10 and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.