Skip to content

Commit

Permalink
fix(indexprovider): announce only in correct state
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahhoward committed Oct 7, 2022
1 parent 9cd1540 commit 63ba701
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion indexprovider/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ func (w *Wrapper) IndexerAnnounceAllDeals(ctx context.Context) error {
var merr error

for _, d := range deals {
if d.Checkpoint >= dealcheckpoints.IndexedAndAnnounced {
// filter out deals that will announce automatically at a later
// point in their execution, as well as deals that are not processing at all
// (i.e. in an error state or expired)
// (note technically this is only one check point state IndexedAndAnnounced but is written so
// it will work if we ever introduce additional states between IndexedAndAnnounced & Complete)
if d.Checkpoint < dealcheckpoints.IndexedAndAnnounced || d.Checkpoint >= dealcheckpoints.Complete {
continue
}

Expand Down

0 comments on commit 63ba701

Please sign in to comment.