hyperledger-labs / orion-sdk-go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If connection-config has no roots at all, return error

tock-ibm opened this issue · comments

// ConnectionConfig required configuration in order to
// open session with BCDB instance, replica set informations
// servers root CAs
type ConnectionConfig struct {
// List of replicas URIs client can connect to
ReplicaSet []*Replica
// Keeps path to the server's root CA
RootCAs []string
// Logger instance, if nil an internal logger is created
Logger *logger.SugarLogger
}

when creating a db instance in bcdb.Create, check that there is

  • at least one CA cert
  • at least one replica