Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Conversation

@juliangruber
Copy link
Member

No description provided.

@bajtos
Copy link
Member

bajtos commented Nov 27, 2024

I think the right solution is to modify the code setting up eligible deals to delete any deals created by previous runs.

Current code:

    before(async () => {
      await client.query(`
        INSERT INTO retrievable_deals (cid, miner_id, client_id, expires_at)
        VALUES
        ('bafyone', 'f0210', 'f0800', '2100-01-01'),
        ('bafyone', 'f0220', 'f0800', '2100-01-01'),
        ('bafytwo', 'f0220', 'f0810', '2100-01-01'),
        ('bafyone', 'f0230', 'f0800', '2100-01-01'),
        ('bafytwo', 'f0230', 'f0800', '2100-01-01'),
        ('bafythree', 'f0230', 'f0810', '2100-01-01'),
        ('bafyfour', 'f0230', 'f0820', '2100-01-01'),
        ('bafyexpired', 'f0230', 'f0800', '2020-01-01')
        ON CONFLICT DO NOTHING
      `)
      await client.query(`
        INSERT INTO allocator_clients (allocator_id, client_id)
        VALUES
        ('f0500', 'f0800'),
        ('f0500', 'f0810'),
        ('f0520', 'f0820')
        ON CONFLICT DO NOTHING
      `)
    })

What to do: before inserting into retrievable_deals, delete any existing rows where miner_id is f0210, f0220 or f0230.

@bajtos
Copy link
Member

bajtos commented Nov 27, 2024

It's also possible my understanding is wrong and the suggestion above won't fix anything.

@bajtos
Copy link
Member

bajtos commented Nov 27, 2024

Since it's difficult to figure out why these tests are failing on the subsequent run, it would be great to start by adding more visibility into what's happening under the hood. E.g. add debug() statements to print full details of the eligible deals for the queried miner.

@bajtos bajtos closed this Jan 7, 2026
@github-project-automation github-project-automation bot moved this to ✅ done in CheckerNetwork Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: ✅ done

Development

Successfully merging this pull request may close these issues.

3 participants