stop requesting every tx in existence.
This commit is contained in:
parent
65278a3296
commit
e968e1701e
@ -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;
|
||||
|
||||
@ -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();
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user