Skip to content

Commit

Permalink
Remove unused fields in contractor (#1486)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Aug 28, 2024
2 parents 2efe9fc + 7ce7457 commit 225c369
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions autopilot/contractor/contractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ type (
revisionSubmissionBuffer uint64

firstRefreshFailure map[types.FileContractID]time.Time

shutdownCtx context.Context
shutdownCtxCancel context.CancelFunc
}

scoredHost struct {
Expand Down Expand Up @@ -167,7 +164,6 @@ type (

func New(bus Bus, alerter alerts.Alerter, logger *zap.SugaredLogger, revisionSubmissionBuffer uint64, revisionBroadcastInterval time.Duration) *Contractor {
logger = logger.Named("contractor")
ctx, cancel := context.WithCancel(context.Background())
return &Contractor{
bus: bus,
alerter: alerter,
Expand All @@ -179,17 +175,9 @@ func New(bus Bus, alerter alerts.Alerter, logger *zap.SugaredLogger, revisionSub
revisionSubmissionBuffer: revisionSubmissionBuffer,

firstRefreshFailure: make(map[types.FileContractID]time.Time),

shutdownCtx: ctx,
shutdownCtxCancel: cancel,
}
}

func (c *Contractor) Close() error {
c.shutdownCtxCancel()
return nil
}

func (c *Contractor) PerformContractMaintenance(ctx context.Context, w Worker, state *MaintenanceState) (bool, error) {
return performContractMaintenance(newMaintenanceCtx(ctx, state), c.alerter, c.bus, c.churn, w, c, c, c, c.logger)
}
Expand Down

0 comments on commit 225c369

Please sign in to comment.