Skip to content

Commit

Permalink
feat: remove mutex pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRamirezM committed Aug 30, 2024
1 parent e41557f commit bd9488c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{},
Expand Down

0 comments on commit bd9488c

Please sign in to comment.