refactor chain.has.
This commit is contained in:
parent
5a26b7b71e
commit
0e5d7c41f2
@ -378,14 +378,12 @@ Chain.prototype.has = function has(hash, noProbe, cb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!noProbe && this.index.bloom.test(hash, 'hex')) {
|
|
||||||
// XXX find hash
|
|
||||||
return cb(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.hasOrphan(hash))
|
if (this.hasOrphan(hash))
|
||||||
return cb(true);
|
return cb(true);
|
||||||
|
|
||||||
|
if (!noProbe && this.hasBlock(hash))
|
||||||
|
return cb(true);
|
||||||
|
|
||||||
return cb(false);
|
return cb(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user