refactor chain.has.

This commit is contained in:
Christopher Jeffrey 2016-01-01 19:54:22 -08:00
parent 5a26b7b71e
commit 0e5d7c41f2

View File

@ -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))
return cb(true);
if (!noProbe && this.hasBlock(hash))
return cb(true);
return cb(false);
};