stop requesting every tx in existence.

This commit is contained in:
Christopher Jeffrey 2016-05-23 03:51:35 -07:00
parent 65278a3296
commit e968e1701e
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 6 additions and 7 deletions

View File

@ -235,11 +235,6 @@ Peer.prototype._init = function init() {
if (self.pool.feeRate !== -1)
self.setFeeRate(self.pool.feeRate);
// If we're fully synced, see
// what we missed out on.
if (self.pool.synced)
self.getMempool();
// Finally we can let the pool know
// that this peer is ready to go.
self.ack = true;

View File

@ -313,8 +313,8 @@ Pool.prototype._init = function _init() {
this.chain.on('full', function() {
self._stopTimer();
self._stopInterval();
if (!self.synced)
self.getMempool();
if (!self.synced && self.peers.load)
self.peers.load.getMempool();
self.synced = true;
self.emit('full');
bcoin.debug('Chain is fully synced (height=%d).', self.chain.height);
@ -557,8 +557,12 @@ Pool.prototype._addLoader = function _addLoader() {
});
peer.once('ack', function() {
if (self.synced)
peer.getMempool();
if (!self.syncing)
return;
self._load();
});