application attempts to claim a reward repeatedly #215

Closed
opened 2017-06-09 00:23:17 +02:00 by nikooo777 · 1 comment
nikooo777 commented 2017-06-09 00:23:17 +02:00 (Migrated from github.com)

The Issue

When entering the publish section the application tries to claim the reward for "new_channel" which might eventually stress the server/api and could be avoided entirely.

Steps to reproduce

  1. Open the application and check if you already claimed the "new_channel" reward (Channel Surfing). If that's a positive then move to the next step
  2. open the developer console and watch the network for XHRs
  3. click on Publish
  4. observe the post request "new" return error 400

Expected behaviour

The application should cache already claimed rewards and never attempt to claim again

Actual behaviour

each time the publish tab is opened, a request is posted to https://api.lbry.io/reward/new with payload

app_id:2DKyAv7T9Ro8B9biH9j555Ry1wRHvsUhcg16pZnV****************
reward_type:new_channel
wallet_address:bPgwZZ1Wmb1RK1iDzJkCEtC1dAC51AQj4p
transaction_id:f3e57c42c74ede58d3d02d322ab3737682c2624dc98b805e48c2790547a7ef69

and an error 400 is returned

{
  "success": false,
  "error": "This reward has already been awarded to this person.",
  "data": null
}

System Configuration

{
  "id": null,
  "jsonrpc": "2.0",
  "result": {
    "build": "rc",
    "ip": "*********",
    "lbrynet_version": "0.11.0rc1",
    "lbryschema_version": "0.0.6",
    "lbryum_version": "2.7.24",
    "os_release": "4.4.0-78-generic",
    "os_system": "Linux",
    "platform": "Linux-4.4.0-78-generic-x86_64-with-Ubuntu-16.04-xenial",
    "processor": "x86_64",
    "python_version": "2.7.12"
  }
}
## The Issue When entering the publish section the application tries to claim the reward for "new_channel" which might eventually stress the server/api and could be avoided entirely. ### Steps to reproduce 1. Open the application and check if you already claimed the "new_channel" reward (Channel Surfing). If that's a positive then move to the next step 2. open the developer console and watch the network for XHRs 3. click on Publish 4. observe the post request "new" return error 400 ### Expected behaviour The application should cache already claimed rewards and never attempt to claim again ### Actual behaviour each time the publish tab is opened, a request is posted to https://api.lbry.io/reward/new with payload ``` app_id:2DKyAv7T9Ro8B9biH9j555Ry1wRHvsUhcg16pZnV**************** reward_type:new_channel wallet_address:bPgwZZ1Wmb1RK1iDzJkCEtC1dAC51AQj4p transaction_id:f3e57c42c74ede58d3d02d322ab3737682c2624dc98b805e48c2790547a7ef69 ``` and an error 400 is returned ``` { "success": false, "error": "This reward has already been awarded to this person.", "data": null } ``` ## System Configuration ``` { "id": null, "jsonrpc": "2.0", "result": { "build": "rc", "ip": "*********", "lbrynet_version": "0.11.0rc1", "lbryschema_version": "0.0.6", "lbryum_version": "2.7.24", "os_release": "4.4.0-78-generic", "os_system": "Linux", "platform": "Linux-4.4.0-78-generic-x86_64-with-Ubuntu-16.04-xenial", "processor": "x86_64", "python_version": "2.7.12" } } ```
kauffj commented 2017-06-09 02:27:12 +02:00 (Migrated from github.com)

This doesn't happen in upcoming branch (though it still does and will happen on views).

This doesn't happen in upcoming branch (though it still does and will happen on views).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#215
No description provided.