chain: do not create duplicate orphans

This commit is contained in:
Fedor Indutny 2014-05-01 02:31:42 +04:00
parent 6cb1594424
commit 98bf123f5d

View File

@ -29,7 +29,7 @@ Chain.prototype.add = function add(block) {
// Add orphan
if (this.last && prev !== this.last) {
if (!this.orphan.map[prev]) {
if (!this.map[hash] && !this.orphan.map[prev]) {
this.orphan.count++;
this.orphan.map[prev] = block;
}