mempool: minor.
This commit is contained in:
parent
82a1a24138
commit
b2065cc84d
@ -1470,15 +1470,16 @@ Mempool.prototype.removeOrphan = function removeOrphan(hash) {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
j = hashes.indexOf(hash);
|
j = hashes.indexOf(hash);
|
||||||
if (j !== -1)
|
|
||||||
hashes.splice(j, 1);
|
if (j === -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
hashes.splice(j, 1);
|
||||||
|
|
||||||
if (hashes.length === 0) {
|
if (hashes.length === 0) {
|
||||||
delete this.waiting[prev];
|
delete this.waiting[prev];
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.waiting[prev] = hashes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete this.orphans[hash];
|
delete this.orphans[hash];
|
||||||
@ -1622,11 +1623,6 @@ Mempool.prototype.fillAllCoins = co(function* fillAllCoins(tx) {
|
|||||||
hash = input.prevout.hash;
|
hash = input.prevout.hash;
|
||||||
index = input.prevout.index;
|
index = input.prevout.index;
|
||||||
|
|
||||||
if (this.options.test) {
|
|
||||||
if (input.coin)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
coin = this.getCoin(hash, index);
|
coin = this.getCoin(hash, index);
|
||||||
|
|
||||||
if (coin) {
|
if (coin) {
|
||||||
|
|||||||
@ -24,8 +24,7 @@ describe('Mempool', function() {
|
|||||||
mempool = new bcoin.mempool({
|
mempool = new bcoin.mempool({
|
||||||
chain: chain,
|
chain: chain,
|
||||||
name: 'mempool-test',
|
name: 'mempool-test',
|
||||||
db: 'memory',
|
db: 'memory'
|
||||||
test: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
walletdb = new bcoin.walletdb({
|
walletdb = new bcoin.walletdb({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user