From 5e0d94a2cd8a465f896ad5e29fc76babe6e3fd09 Mon Sep 17 00:00:00 2001 From: Nate Maninger Date: Sun, 5 May 2024 15:11:40 -0700 Subject: [PATCH] scan last_announcement --- persist/sqlite/blocks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/persist/sqlite/blocks.go b/persist/sqlite/blocks.go index 90a9e3e..e57f0a4 100644 --- a/persist/sqlite/blocks.go +++ b/persist/sqlite/blocks.go @@ -105,7 +105,7 @@ func (s *Store) SetLastAnnouncement(cids []cid.Cid, t time.Time) error { // interval to determine if the CID should be announced. func (s *Store) ProvideCIDs(limit int) (cids []ipfs.PinnedCID, err error) { err = s.transaction(func(tx *txn) error { - const query = `SELECT b.cid + const query = `SELECT b.cid, pb.last_announcement FROM pinned_blocks pb INNER JOIN blocks b ON (b.id=pb.block_id) ORDER BY pb.last_announcement ASC