filter claims by bid_state: 'Controlling' #638
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
Osprey
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
resilience
Tom's Wishlist
type: bug
type: discussion
type: error handling
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/spee.ch#638
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "controlling-claims-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -63,19 +63,22 @@ export default (db, table, sequelize) => ({
});
},
Do something like:
getAllChannelClaims: async (channelClaimId, bidState = 'Controlling') => {
where: bidState === false ? { publisher_id: channelClaimId } : { publisher_id: channelClaimId, bid_state: bidState },
@ -63,19 +63,22 @@ export default (db, table, sequelize) => ({
});
},
This way all can be easily queried by disabling the default filter
@ -65,3 +65,3 @@
getAllChannelClaims: async (channelClaimId) => {
getAllChannelClaims: async (channelClaimId, bidState = 'Controlling') => {
logger.debug(`claim.getAllChannelClaims for ${channelClaimId}`);
actually, I think this should be either Controlling or Active.
@ -65,3 +65,3 @@
getAllChannelClaims: async (channelClaimId) => {
getAllChannelClaims: async (channelClaimId, bidState = 'Controlling') => {
logger.debug(`claim.getAllChannelClaims for ${channelClaimId}`);
@tiger5226 can you confirm?
@ -65,3 +65,3 @@
getAllChannelClaims: async (channelClaimId) => {
getAllChannelClaims: async (channelClaimId, bidState = 'Controlling') => {
logger.debug(`claim.getAllChannelClaims for ${channelClaimId}`);
Well they are different bid states.
Controlling
means the claim has won the bid for that name, whileActive
means it has lost. So the question is do they want all claims, regardless of bid state? Then yes, both should be considered. There is alsoAccepted
,Spent
too.@ -65,3 +65,3 @@
getAllChannelClaims: async (channelClaimId) => {
getAllChannelClaims: async (channelClaimId, bidState = 'Controlling') => {
logger.debug(`claim.getAllChannelClaims for ${channelClaimId}`);
I didn't look at the overall code, but judging by the variable name it's looking it up by the claim ID, and not the claim name... So I don't see why we'd want only controlling claims.
@ -65,3 +65,3 @@
getAllChannelClaims: async (channelClaimId) => {
getAllChannelClaims: async (channelClaimId, bidState = 'Controlling') => {
logger.debug(`claim.getAllChannelClaims for ${channelClaimId}`);
that's a good point. Basically it will return null if it is not controlling. Seems like this check should be somewhere else more descriptive.
@ -65,3 +65,3 @@
getAllChannelClaims: async (channelClaimId) => {
getAllChannelClaims: async (channelClaimId, bidState = 'Controlling') => {
logger.debug(`claim.getAllChannelClaims for ${channelClaimId}`);
As of #668 it's getting Controlling, Active, and Accepted: