Use node name as backup in case pubkey is not present (#50)

This commit is contained in:
Maciej Hirsz
2018-09-24 21:33:06 +02:00
committed by GitHub
parent 1559b82eb0
commit 5e995ea21d
3 changed files with 22 additions and 19 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ export default class Node {
messages: Array<Message>,
) {
this.ip = ip;
this.id = getId(address);
this.id = getId(address, name);
this.name = name;
this.chain = chain;
this.config = config;
@@ -205,7 +205,7 @@ export default class Node {
this.socket.close();
this.socket.terminate();
refreshId(this.address, this.id);
refreshId(this.address, this.name, this.id);
this.events.emit('disconnect');
}