Skip to content

Commit

Permalink
feat(f3): log when gaining/losing participation leases (#12581)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien authored and rjan90 committed Oct 14, 2024
1 parent b83fe1a commit 278addf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chain/lf3/participation_lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ func (l *leaser) participate(ticket api.F3ParticipationTicket) (api.F3Participat
// For safety, strictly require lease start instance to never decrease.
return api.F3ParticipationLease{}, api.ErrF3ParticipationTicketStartBeforeExisting
}
if !found {
log.Infof("started participating in F3 for miner %d", newLease.MinerID)
}
l.leases[newLease.MinerID] = newLease
select {
case l.notifyParticipation <- struct{}{}:
Expand All @@ -117,6 +120,7 @@ func (l *leaser) getParticipantsByInstance(instance uint64) []uint64 {
if instance > lease.ToInstance() {
// Lazily delete the expired leases.
delete(l.leases, id)
log.Warnf("lost F3 participation lease for miner %d", id)
} else {
participants = append(participants, id)
}
Expand Down

0 comments on commit 278addf

Please sign in to comment.