func (s *SmartContract) passedByVoting(ctx contractapi.TransactionContextInterface, proposal *Proposal) (bool, error) {
channelID := proposal.ChannelID
var err error
// Use organizations in the system channel when creating a channel
if proposal.Action == CreationAction {
channelID, err = s.GetSystemChannelID(ctx)
if err != nil {
return false, fmt.Errorf("error happend getting the system channel ID: %v", err)
}
}
satisfied, err := s.meetCriteria(ctx, proposal.Artifacts.Signatures, MAJORITY, channelID) // why not choose the actual /Channel/Application/Admins policy of the channel
if err != nil {
return false, fmt.Errorf("error happened checking to meet criteria: %v", err)
}
return satisfied, nil
}