func ConnectManyReplicas(conn ReplicaConnector, targets map[uint32]string, dialOpts ...grpc.DialOption) error {
	for id, target := range targets {
		err := conn.ConnectReplica(id, target, dialOpts...)
		if err != nil {
			return err
		}
	}
	return nil
}
ConnectManyReplicas helps to establish connections to multiple
replicas. It invokes ConnectReplica on the specified connector for
each replica in the supplied map. The map holds gRPC target
addresses indexed by replica ID.
package connector
import (
	"fmt"
	"google.golang.org/grpc"
	"github.com/hyperledger-labs/minbft/api"
	common "github.com/hyperledger-labs/minbft/sample/conn/common/connector"
	pb "github.com/hyperledger-labs/minbft/sample/conn/grpc/proto"
)
type ReplicaConnector interface {
	api.ReplicaConnector
	ConnectReplica(replicaID uint32, target string, dialOpts ...grpc.DialOption) error
}