From c270b4514005902b86af7168ef4ab45d207f4a46 Mon Sep 17 00:00:00 2001 From: Krish Date: Wed, 13 Nov 2024 11:16:48 +0800 Subject: [PATCH] chore: remove unused code --- miner/fix_manager.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/miner/fix_manager.go b/miner/fix_manager.go index 5e70711a0..b2f097ee8 100644 --- a/miner/fix_manager.go +++ b/miner/fix_manager.go @@ -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 @@ -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)