claimAvailability treats abandoned claim names as unavailable on publish #1033

Open
opened 2019-08-20 21:55:37 +02:00 by jessopb · 0 comments
jessopb commented 2019-08-20 21:55:37 +02:00 (Migrated from github.com)

Most queries in chainquery claimQueries restrict queries:

const whereClause = bidState || {
      [sequelize.Op.or]: [
        { bid_state: 'Controlling' },
        { bid_state: 'Active' },
        { bid_state: 'Accepted' },
      ],
    };

checkClaimAvailability has it's own chainquery.claim query:

  return chainquery.claim
    .findAll({
      attributes: ['claim_address'],
      where     : {
        name,
        claim_address: {
          [Op.or]: claimAddresses,
        },
      },
    })
    .then(result => {
      return (result.length <= 0);
    })
    .catch(error => {
      throw error;
    });

That causes claims to show as reserved names even when abandoned. This query could probably be moved into claim queries with the rest of them.

Most queries in chainquery claimQueries restrict queries: ``` const whereClause = bidState || { [sequelize.Op.or]: [ { bid_state: 'Controlling' }, { bid_state: 'Active' }, { bid_state: 'Accepted' }, ], }; ``` checkClaimAvailability has it's own chainquery.claim query: ``` return chainquery.claim .findAll({ attributes: ['claim_address'], where : { name, claim_address: { [Op.or]: claimAddresses, }, }, }) .then(result => { return (result.length <= 0); }) .catch(error => { throw error; }); ``` That causes claims to show as reserved names even when abandoned. This query could probably be moved into claim queries with the rest of them.
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/spee.ch#1033
No description provided.