fix orphan pruning.
This commit is contained in:
parent
d6bef43d71
commit
21ff3f1d78
@ -1287,7 +1287,7 @@ Chain.prototype.add = function add(initial, peer, callback, force) {
|
||||
// Failsafe for large orphan chains. Do not
|
||||
// allow more than 20mb stored in memory.
|
||||
if (self.orphan.size > self.orphanLimit)
|
||||
self.pruneOrphans();
|
||||
self.pruneOrphans(peer);
|
||||
|
||||
// Keep track of total blocks handled.
|
||||
self.total += total;
|
||||
@ -1316,7 +1316,7 @@ Chain.prototype.purgeOrphans = function purgeOrphans() {
|
||||
this.orphan.size = 0;
|
||||
};
|
||||
|
||||
Chain.prototype.pruneOrphans = function pruneOrphans() {
|
||||
Chain.prototype.pruneOrphans = function pruneOrphans(peer) {
|
||||
var self = this;
|
||||
var best, last;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user