lbryio / lbry-sdk

The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
https://lbry.com
MIT License
7.19k stars 482 forks source link

`effective_amount` of *non-winning* claims doesn't include supports when returned from `claim_search`. Breaks trending? (new hub) #3465

Closed keikari closed 2 years ago

keikari commented 2 years ago

Not sure if related to the issue, User complained trending not working with all claims. I wasn't able to get claim(https://odysee.com/@BarrettMopar:9/Xss:2) to wild-west(odysee) with a 8k support. Just before that tested with this (https://odysee.com/@purism:8/video-editing-with-linux-the-most:6) using the same amount, and it appeared top of the wild-west instantly.

Claim with the issue: 213da40c26bf2a4b58f70377e3c1bd413488d7b4 This claim is not winning(with winning I mean controlling).(But will probably take over in couple days) This claim (atm) has support of 8k(my test support). Calls done on spv18

lbrynet claim search --claim_ids 213da40c26bf2a4b58f70377e3c1bd413488d7b4 Output: effective_amount: "0.02"

lbrynet resolve lbry://Xss:213da40c26bf2a4b58f70377e3c1bd413488d7b4 Output: effective_amount": "8000.02"

tzarebczan commented 2 years ago

This fixed trending + support amount, but now effective amount is 0. This causes the top searches and other display issues on Odysee when sorting by effective amount.

jackrobison commented 2 years ago

@tzarebczan It's correct for it to return 0 for claims that aren't activated - can you order by support_amount? That should do what you're looking for.

tzarebczan commented 2 years ago

Effective amount was correct prior to this fix - it should be the pending effective amount because it's not even trying to contend for the top bid. Even if it was, we should still show pending.

Can't use support amount sort because it doesn't include the bid amount.

So showing pending should be considered or a new field / sort options are required for pending