From 212c1a3430de38c5082c10ac8bd92088d5b9c550 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 15 Oct 2016 20:38:50 -0700 Subject: [PATCH] txdb: fix verify for orphans. --- lib/wallet/txdb.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/wallet/txdb.js b/lib/wallet/txdb.js index 99eb7672..18d5fe9e 100644 --- a/lib/wallet/txdb.js +++ b/lib/wallet/txdb.js @@ -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;