Skip to content

Commit

Permalink
Fixing #662 Missed Q.nbind calls
Browse files Browse the repository at this point in the history
  • Loading branch information
c-geek committed Oct 16, 2016
1 parent 94fa690 commit 35d1815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/lib/sync.js
Expand Up @@ -250,7 +250,7 @@ function Synchroniser (server, host, port, conf, interactive) {
watcher.writeStatus('Peers...');
yield syncPeer(node);
const merkle = yield dal.merkleForPeers();
const getPeers = Q.nbind(node.network.peering.peers.get, node);
const getPeers = node.getPeers.bind(node);
const json2 = yield getPeers({});
const rm = new NodesMerkle(json2);
if(rm.root() != merkle.root()){
Expand Down
4 changes: 2 additions & 2 deletions app/service/PeeringService.js
Expand Up @@ -375,10 +375,10 @@ function PeeringService(server) {
const node = yield aPeer.connect();
yield checkPeerValidity(aPeer, node);
//let remotePeer = yield Q.nbind(node.network.peering.get)();
const json = yield Q.nbind(node.network.peering.peers.get, node)({ leaves: true });
const json = yield node.getPeers.bind(node)({ leaves: true });
for (let i = 0, len = json.leaves.length; i < len; i++) {
let leaf = json.leaves[i];
let subpeer = yield Q.nbind(node.network.peering.peers.get, node)({ leaf: leaf });
let subpeer = yield node.getPeers.bind(node)({ leaf: leaf });
subpeers.push(subpeer);
}
return subpeers;
Expand Down

0 comments on commit 35d1815

Please sign in to comment.