// request message logs for a specific height to all validators, return error if it can't connect to some validator
request message logs for a specific height to all validators, return error if it can't connect to some validator
// request message logs for a specific height to all validators return error if it can ' t connect to some validator
func (monitor *Monitor) connectToValidators() error {
	if monitor.Validators == nil || len(monitor.Validators) == 0 {
		return fmt.Errorf("error: no validators given")
	}
	for _, val := range monitor.Validators {
		conn, err := connection.Connect(val)
		if err != nil {
			return fmt.Errorf("error while connecting to one of the validators given: %s", err)
		}
		go monitor.receiveHvsFromValidator(conn)
	}
	return nil
}
func ( monitor * Monitor ) connectToValidators ( ) error { if monitor . Validators == nil || len ( monitor . Validators ) == 0 { return fmt . Errorf ( " " ) } for _ , val := range monitor . Validators { conn , err := connection . Connect ( val ) if err != nil { return fmt . Errorf ( " " , err ) } go monitor . receiveHvsFromValidator ( conn ) } return nil }
request message logs for a specific height to all validators, return error if it can't connect to some validator
request message logs for a specific height to all validators return error if it can ' t connect to some validator
// resolve validator addresses given and connect to them // start goroutines to send message and wait for reply from each validator