Removed fbft locks.

pull/4369/head
frozen 2 years ago committed by Casey Gardiner
parent 5175ec6225
commit ce18c59d4b
  1. 7
      consensus/consensus_fbft.go

@ -1,9 +1,6 @@
package consensus package consensus
import "sync"
type LockedFBFTPhase struct { type LockedFBFTPhase struct {
mu sync.Mutex
phase FBFTPhase phase FBFTPhase
} }
@ -14,14 +11,10 @@ func NewLockedFBFTPhase(initialPhrase FBFTPhase) *LockedFBFTPhase {
} }
func (a *LockedFBFTPhase) Set(phrase FBFTPhase) { func (a *LockedFBFTPhase) Set(phrase FBFTPhase) {
a.mu.Lock()
a.phase = phrase a.phase = phrase
a.mu.Unlock()
} }
func (a *LockedFBFTPhase) Get() FBFTPhase { func (a *LockedFBFTPhase) Get() FBFTPhase {
a.mu.Lock()
defer a.mu.Unlock()
return a.phase return a.phase
} }

Loading…
Cancel
Save