txdb: failsafe for unconfirm.

This commit is contained in:
Christopher Jeffrey 2017-01-26 00:59:50 -08:00
parent 0a1c0d1890
commit 977ef01d5a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1345,6 +1345,9 @@ TXDB.prototype._unconfirm = co(function* unconfirm(hash) {
if (!wtx)
return;
if (wtx.height === -1)
return;
return yield this.disconnect(wtx, wtx.getBlock());
});