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)
|
if (self.pool.feeRate !== -1)
|
||||||
self.setFeeRate(self.pool.feeRate);
|
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
|
// Finally we can let the pool know
|
||||||
// that this peer is ready to go.
|
// that this peer is ready to go.
|
||||||
self.ack = true;
|
self.ack = true;
|
||||||
|
|||||||
@ -313,8 +313,8 @@ Pool.prototype._init = function _init() {
|
|||||||
this.chain.on('full', function() {
|
this.chain.on('full', function() {
|
||||||
self._stopTimer();
|
self._stopTimer();
|
||||||
self._stopInterval();
|
self._stopInterval();
|
||||||
if (!self.synced)
|
if (!self.synced && self.peers.load)
|
||||||
self.getMempool();
|
self.peers.load.getMempool();
|
||||||
self.synced = true;
|
self.synced = true;
|
||||||
self.emit('full');
|
self.emit('full');
|
||||||
bcoin.debug('Chain is fully synced (height=%d).', self.chain.height);
|
bcoin.debug('Chain is fully synced (height=%d).', self.chain.height);
|
||||||
@ -557,8 +557,12 @@ Pool.prototype._addLoader = function _addLoader() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
peer.once('ack', function() {
|
peer.once('ack', function() {
|
||||||
|
if (self.synced)
|
||||||
|
peer.getMempool();
|
||||||
|
|
||||||
if (!self.syncing)
|
if (!self.syncing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
self._load();
|
self._load();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user