txdb: fix verify for orphans.

This commit is contained in:
Christopher Jeffrey 2016-10-15 20:38:50 -07:00
parent 605874068b
commit 212c1a3430
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -544,8 +544,11 @@ TXDB.prototype.verify = co(function* verify(tx, info) {
// We must be double-spending.
coin = yield this.getSpentCoin(spent, prevout);
if (!coin)
throw new Error('Could not find double-spent coin.');
// Double-spent orphan.
if (!coin) {
orphans[i] = true;
continue;
}
input.coin = coin;