Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AeonSw4n committed Jan 14, 2024
1 parent ee8a188 commit 4a94323
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/connection_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (cc *ConnectionController) initiatePersistentConnections() {
// are persistent in the sense that if we disconnect from one, we will
// try to reconnect to the same one.
for _, connectIp := range cc.connectIps {
if err := cc.createPersistentOutboundConnection(connectIp); err != nil {
if err := cc.CreateNonValidatorPersistentOutboundConnection(connectIp); err != nil {
glog.Errorf("ConnectionController.initiatePersistentConnections: Problem connecting "+
"to connectIp %v: %v", connectIp, err)
}
Expand Down Expand Up @@ -254,8 +254,13 @@ func (cc *ConnectionController) connectValidators(activeValidatorsMap map[bls.Se
_, exists := cc.rnManager.GetValidatorIndex().Get(pk)
if !exists {
// FIXME: for now we'll only use the first address in the ValidatorEntry
publicKey, err := pk.Deserialize()
if err != nil {
continue
}

address := string(validator.Domains[0])
if err := cc.createValidatorConnection(address, pk); err != nil {
if err := cc.CreateValidatorConnection(address, publicKey); err != nil {
// TODO: Do we want to log an error here?
continue
}
Expand Down

0 comments on commit 4a94323

Please sign in to comment.