Skip to content
Snippets Groups Projects
Commit af869764 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix #263 do not allow to forge wrong peer record (no currency, DNS, IP or port)

parent 0a97f06c
No related branches found
No related tags found
No related merge requests found
......@@ -158,6 +158,12 @@ function PeeringService(server, pair, dal) {
if (theConf.remoteport) {
endpoint += ' ' + theConf.remoteport;
}
if (!currency || endpoint == 'BASIC_MERKLED_API') {
logger.error('It seems there is an issue with your configuration.');
logger.error('Please restart your node with:');
logger.error('$ ucoind restart');
return Q.Promise((resolve) => null);
}
// Choosing next based-block for our peer record: we basically want the most distant possible from current
let minBlock = current ? current.number - 30 : 0;
// But if already have a peer record within this distance, we need to take the next block of it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment