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 }