From ce18c59d4b9979a28062e87370c898d057a4484b Mon Sep 17 00:00:00 2001 From: frozen <355847+Frozen@users.noreply.github.com> Date: Wed, 2 Nov 2022 02:28:03 +0800 Subject: [PATCH] Removed fbft locks. --- consensus/consensus_fbft.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/consensus/consensus_fbft.go b/consensus/consensus_fbft.go index 313abf061..29c9714d3 100644 --- a/consensus/consensus_fbft.go +++ b/consensus/consensus_fbft.go @@ -1,9 +1,6 @@ package consensus -import "sync" - type LockedFBFTPhase struct { - mu sync.Mutex phase FBFTPhase } @@ -14,14 +11,10 @@ func NewLockedFBFTPhase(initialPhrase FBFTPhase) *LockedFBFTPhase { } func (a *LockedFBFTPhase) Set(phrase FBFTPhase) { - a.mu.Lock() a.phase = phrase - a.mu.Unlock() } func (a *LockedFBFTPhase) Get() FBFTPhase { - a.mu.Lock() - defer a.mu.Unlock() return a.phase }