orphan soil. misc.
This commit is contained in:
parent
d6e7ca0660
commit
7829ff3bea
@ -590,8 +590,6 @@ Peer.prototype._handleInv = function handleInv(items) {
|
|||||||
this.emit('txs', txs.map(function(tx) {
|
this.emit('txs', txs.map(function(tx) {
|
||||||
return tx.hash;
|
return tx.hash;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.getData(txs);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Peer.prototype._handleHeaders = function handleHeaders(headers) {
|
Peer.prototype._handleHeaders = function handleHeaders(headers) {
|
||||||
|
|||||||
@ -179,10 +179,6 @@ Pool.prototype._init = function _init() {
|
|||||||
self._handleTX(tx, peer);
|
self._handleTX(tx, peer);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (peer === self.peers.load) {
|
|
||||||
self._startInterval();
|
|
||||||
self._startTimer();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.chain.on('fork', function(block, data, peer) {
|
this.chain.on('fork', function(block, data, peer) {
|
||||||
@ -275,7 +271,12 @@ Pool.prototype.resolveOrphan = function resolveOrphan(peer, top, orphan) {
|
|||||||
|
|
||||||
// If we're already processing the block
|
// If we're already processing the block
|
||||||
// that would resolve this, ignore.
|
// that would resolve this, ignore.
|
||||||
if (self.request.map[orphan.soil] || self.chain.hasPending(orphan.soil)) {
|
if (self.request.map[orphan.soil]) {
|
||||||
|
utils.debug('Already requested orphan "soil".');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.chain.hasPending(orphan.soil)) {
|
||||||
utils.debug('Already processing orphan "soil".');
|
utils.debug('Already processing orphan "soil".');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -442,6 +443,7 @@ Pool.prototype._addLoader = function _addLoader() {
|
|||||||
return;
|
return;
|
||||||
if (!self.syncing)
|
if (!self.syncing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If the peer sent us a block that was added
|
// If the peer sent us a block that was added
|
||||||
// to the chain (not orphans), reset the timeout.
|
// to the chain (not orphans), reset the timeout.
|
||||||
self._handleBlock(block, peer, function(err, added) {
|
self._handleBlock(block, peer, function(err, added) {
|
||||||
@ -460,6 +462,7 @@ Pool.prototype._addLoader = function _addLoader() {
|
|||||||
return;
|
return;
|
||||||
if (!self.syncing)
|
if (!self.syncing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If the peer sent us a block that was added
|
// If the peer sent us a block that was added
|
||||||
// to the chain (not orphans), reset the timeout.
|
// to the chain (not orphans), reset the timeout.
|
||||||
self._handleBlock(block, peer, function(err, added) {
|
self._handleBlock(block, peer, function(err, added) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user