Merge pull request #2418 from cfromknecht/connectpeer-logging

rpcserver: add connectpeer log, fix existing formatting
This commit is contained in:
Conner Fromknecht 2019-01-10 13:51:48 -08:00 committed by GitHub
commit eb1167cc52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -990,8 +990,11 @@ func (r *rpcServer) ConnectPeer(ctx context.Context,
ChainNet: activeNetParams.Net,
}
rpcsLog.Debugf("[connectpeer] requested connection to %x@%s",
peerAddr.IdentityKey.SerializeCompressed(), peerAddr.Address)
if err := r.server.ConnectToPeer(peerAddr, in.Perm); err != nil {
rpcsLog.Errorf("(connectpeer): error connecting to peer: %v", err)
rpcsLog.Errorf("[connectpeer]: error connecting to peer: %v", err)
return nil, err
}