Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix 4509. Configuration parameters CA and address in peer.deliver… #4510

Open
wants to merge 1 commit into
base: release-2.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion internal/pkg/peer/orderers/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ func (cs *ConnectionSource) RandomEndpoint() (*Endpoint, error) {
if len(cs.allEndpoints) == 0 {
return nil, errors.Errorf("no endpoints currently defined")
}
return cs.allEndpoints[rand.Intn(len(cs.allEndpoints))], nil
OrderersOverridekeys := make([]string, 0, len(cs.overrides))
for key := range cs.overrides {
OrderersOverridekeys = append(OrderersOverridekeys, key)
}
random := rand.Intn(len(OrderersOverridekeys))
endpoint := cs.overrides[OrderersOverridekeys[random]]
endpoint.Address = cs.allEndpoints[random].Address
return endpoint, nil
}

func (cs *ConnectionSource) Update(globalAddrs []string, orgs map[string]OrdererOrg) {
Expand Down
Loading