MCPcopy
hub / github.com/canopy-network/canopy / LoadCommittee

Method LoadCommittee

fsm/state.go:332–342  ·  view source on GitHub ↗

LoadCommittee() loads the committee validators for a particular committee at a particular height

(chainId uint64, height uint64)

Source from the content-addressed store, hash-verified

330
331// LoadCommittee() loads the committee validators for a particular committee at a particular height
332func (s *StateMachine) LoadCommittee(chainId uint64, height uint64) (lib.ValidatorSet, lib.ErrorI) {
333 // get the historical state at the height
334 historicalFSM, err := s.TimeMachine(height)
335 if err != nil {
336 return lib.ValidatorSet{}, err
337 }
338 // memory management for the historical FSM call
339 defer historicalFSM.Discard()
340 // return the 'committee members' (validator set) for that height
341 return historicalFSM.GetCommitteeMembers(chainId)
342}
343
344// LoadCertificate() loads a quorum certificate (block, results + 2/3rd committee signatures)
345func (s *StateMachine) LoadCertificate(height uint64) (*lib.QuorumCertificate, lib.ErrorI) {

Callers 3

BeginBlockMethod · 0.95
ApplyBlockMethod · 0.95

Calls 3

TimeMachineMethod · 0.95
GetCommitteeMembersMethod · 0.80
DiscardMethod · 0.65

Tested by

no test coverage detected