From bd9488cfb98002286e539303eb6523d73fbe0683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20Ram=C3=ADrez?= Date: Fri, 30 Aug 2024 16:21:07 +0200 Subject: [PATCH] feat: remove mutex pointers --- aggregator/aggregator.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index af326f43..1a1b4591 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -74,8 +74,8 @@ type Aggregator struct { profitabilityChecker aggregatorTxProfitabilityChecker timeSendFinalProof time.Time timeCleanupLockedProofs types.Duration - stateDBMutex *sync.Mutex - timeSendFinalProofMutex *sync.RWMutex + stateDBMutex sync.Mutex + timeSendFinalProofMutex sync.RWMutex // Data stream handling variables currentBatchStreamData []byte @@ -180,11 +180,8 @@ func New( etherman: etherman, ethTxManager: ethTxManager, streamClient: streamClient, - streamClientMutex: sync.Mutex{}, l1Syncr: l1Syncr, profitabilityChecker: profitabilityChecker, - stateDBMutex: &sync.Mutex{}, - timeSendFinalProofMutex: &sync.RWMutex{}, timeCleanupLockedProofs: cfg.CleanupLockedProofsInterval, finalProof: make(chan finalProofMsg), currentBatchStreamData: []byte{},