automatic peer discovery

This commit is contained in:
Manuel Araoz 2014-04-18 18:25:51 -03:00
commit 4ba65dd4e1
9 changed files with 103 additions and 44 deletions

View file

@ -21,7 +21,7 @@ function PrivateKey(opts) {
PrivateKey.prototype.getId = function(prefix) {
var buf = this.bip.extendedPublicKey;
if (prefix) {
buf = Buffer.concat([prefix, this.bip.extendedPublicKey]);
buf = Buffer.concat([prefix, buf]);
}
return util.ripe160(buf).toString('hex');
};