polish reconnect

This commit is contained in:
Manuel Araoz 2014-06-03 11:54:07 -03:00
commit 3934b750f2
2 changed files with 21 additions and 14 deletions

View file

@ -313,8 +313,8 @@ Network.prototype.setCopayerId = function(copayerId) {
};
// TODO cache this.
Network.prototype.peerFromCopayer = function(hex) {
// TODO cache this.
var SIN = bitcore.SIN;
return new SIN(new Buffer(hex,'hex')).toString();
};
@ -409,6 +409,10 @@ Network.prototype.send = function(copayerIds, payload, cb) {
};
Network.prototype.isOnline = function() {
return !!this.peer;
};
Network.prototype.connectTo = function(copayerId) {
var self = this;