check mempool before requesting tx.
This commit is contained in:
parent
5d1e3e1034
commit
3326078694
@ -1612,8 +1612,14 @@ Pool.prototype.getData = function getData(peer, type, hash, options, callback) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (!options.force && type !== self.tx.type)
|
||||
return self.chain.has(hash, done);
|
||||
if (!options.force) {
|
||||
if (type === this.tx.type) {
|
||||
if (!this.mempool)
|
||||
return utils.asyncify(done)(null, false);
|
||||
return this.mempool.hasTX(hash, done);
|
||||
}
|
||||
return this.chain.has(hash, done);
|
||||
}
|
||||
|
||||
return utils.nextTick(function() {
|
||||
return done(null, false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user