diff --git a/lib/PeerSync.js b/lib/PeerSync.js index 7f0d110..389c76c 100644 --- a/lib/PeerSync.js +++ b/lib/PeerSync.js @@ -55,7 +55,6 @@ function spec() { console.log('[p2p_sync] Handle inv for a ' + CoinConst.MSG.to_str(inv.type)); }); // TODO: should limit the invs to objects we haven't seen yet - console.log('getdata'); info.conn.sendGetData(invs); }; diff --git a/test/lib/PeerSync.js b/test/lib/PeerSync.js index f19aa50..f4b3562 100644 --- a/test/lib/PeerSync.js +++ b/test/lib/PeerSync.js @@ -35,7 +35,7 @@ describe('PeerSync', function() { }); it('should call sendGetData', function() { ps.handle_inv(inv_info); - expect(inv_info.conn.sendGetData.calledOnce).to.be.ok; + expect(inv_info.conn.sendGetData.calledTwice).to.be.ok; }); });