txdb: zap.
This commit is contained in:
parent
9fe6919416
commit
4aadce752d
@ -2165,21 +2165,12 @@ TXDB.prototype.zap = co(function* zap(account, age) {
|
|||||||
|
|
||||||
assert(now - tx.ps >= age);
|
assert(now - tx.ps >= age);
|
||||||
|
|
||||||
this.start();
|
|
||||||
|
|
||||||
this.logger.debug('Zapping TX: %s (%s)',
|
this.logger.debug('Zapping TX: %s (%s)',
|
||||||
hash, this.wallet.id);
|
hash, this.wallet.id);
|
||||||
|
|
||||||
try {
|
yield this.remove(hash);
|
||||||
yield this._remove(hash);
|
|
||||||
} catch (e) {
|
|
||||||
this.drop();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
|
|
||||||
hashes.push(hash);
|
hashes.push(hash);
|
||||||
|
|
||||||
yield this.commit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return hashes;
|
return hashes;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user