Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
krish-nr committed Nov 13, 2024
1 parent c4eaff0 commit c270b45
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions miner/fix_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import (

// StateFixManager manages the fix operation state and notification mechanism.
type StateFixManager struct {
mutex sync.Mutex // Protects access to fix state
isFixInProgress bool // Tracks if a fix operation is in progress
mutex sync.Mutex // Protects access to fix state
}

// NewFixManager initializes a FixManager with required dependencies
Expand All @@ -25,17 +24,8 @@ func (fm *StateFixManager) StartFix(worker *worker, id engine.PayloadID, parentH
fm.mutex.Lock()
defer fm.mutex.Unlock()

if fm.isFixInProgress {
log.Warn("Fix is already in progress for this block", "id", id)
return nil
}

fm.isFixInProgress = true
defer func() {
fm.isFixInProgress = false
}()
log.Info("Fix is in progress for the block", "id", id)

log.Info("Starting synchronous fix process", "id", id)
err := worker.fix(parentHash)
if err != nil {
log.Error("Fix process failed", "error", err)
Expand Down

0 comments on commit c270b45

Please sign in to comment.