From f697dc18bbbf23936e4886dbf53c4c48ade63e6b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 5 Oct 2016 02:15:51 -0700 Subject: [PATCH] chaindb: better reset. --- lib/chain/chaindb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chain/chaindb.js b/lib/chain/chaindb.js index cad325a3..f7ad8672 100644 --- a/lib/chain/chaindb.js +++ b/lib/chain/chaindb.js @@ -1271,7 +1271,7 @@ ChainDB.prototype.reset = co(function* reset(block) { tip = yield this.getTip(); - while (tip) { + while (tip && !tip.isGenesis()) { this.start(); if (tip.hash === entry.hash) {