Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RunOnFluxBot committed Nov 16, 2023
1 parent eacdf2e commit a57cd24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/fluxCommunication.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,14 +685,14 @@ async function addOutgoingPeer(req, res) {
}

const nodeList = await fluxCommunicationUtils.deterministicFluxList();
const fluxNode = nodeList.find((node) => node.ip.split(':')[0] === ip && (node.ip.split(':')[1] || 16127) === port);
const fluxNode = nodeList.find((node) => node.ip.split(':')[0] === ip.split(':')[0] && (node.ip.split(':')[1] || 16127) === port);
if (!fluxNode) {
const errMessage = messageHelper.createErrorMessage(`FluxNode ${ip}:${port} is not confirmed on the network.`);
const errMessage = messageHelper.createErrorMessage(`FluxNode ${ip.split(':')[0]}:${port} is not confirmed on the network.`);
return res.json(errMessage);
}

initiateAndHandleConnection(ip);
const message = messageHelper.createSuccessMessage(`Outgoing connection to ${ip}:${port} initiated`);
const message = messageHelper.createSuccessMessage(`Outgoing connection to ${ip.split(':')[0]}:${port} initiated`);
return res.json(message);
} catch (error) {
log.error(error);
Expand Down

0 comments on commit a57cd24

Please sign in to comment.