github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/integration/conditions_test.go (about) 1 package integration 2 3 type Condition func(*Instance) bool 4 5 func RightAway(*Instance) bool { 6 return true 7 } 8 9 func ViewFinalized(view uint64) Condition { 10 return func(in *Instance) bool { 11 return in.forks.FinalizedView() >= view 12 } 13 } 14 15 func ViewReached(view uint64) Condition { 16 return func(in *Instance) bool { 17 return in.pacemaker.CurView() >= view 18 } 19 }