fix join flow
This commit is contained in:
parent
a3d96535cd
commit
b391344daf
4 changed files with 26 additions and 18 deletions
|
|
@ -294,11 +294,13 @@ Network.prototype.greet = function(copayerId, secretNumber) {
|
|||
};
|
||||
|
||||
Network.prototype._addCopayerMap = function(peerId, copayerId) {
|
||||
console.log('[Async.js.296:_addCopayerMap:]',peerId, copayerId); //TODO
|
||||
if (!this.copayerForPeer[peerId]) {
|
||||
if (Object.keys(this.copayerForPeer).length < this.maxPeers) {
|
||||
this.copayerForPeer[peerId] = copayerId;
|
||||
}
|
||||
}
|
||||
console.log('[Async.js.296:_addCopayerMap:]',this.copayerForPeer); //TODO
|
||||
};
|
||||
|
||||
Network.prototype._setInboundPeerAuth = function(peerId) {
|
||||
|
|
@ -374,6 +376,7 @@ Network.prototype.send = function(dest, payload, cb) {
|
|||
dest = this.getCopayerIds();
|
||||
payload.isBroadcast = 1;
|
||||
}
|
||||
console.log('[Async.js.374:dest:]',dest); //TODO
|
||||
|
||||
if (typeof dest === 'string')
|
||||
dest = [dest];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue