txdb: zap.

This commit is contained in:
Christopher Jeffrey 2016-10-12 19:19:41 -07:00
parent 9fe6919416
commit 4aadce752d
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -2165,21 +2165,12 @@ TXDB.prototype.zap = co(function* zap(account, age) {
assert(now - tx.ps >= age);
this.start();
this.logger.debug('Zapping TX: %s (%s)',
hash, this.wallet.id);
try {
yield this._remove(hash);
} catch (e) {
this.drop();
throw e;
}
yield this.remove(hash);
hashes.push(hash);
yield this.commit();
}
return hashes;