From 963e812bf9048f660a33f3f55b46909a210cba63 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 28 Jan 2017 19:06:15 -0800 Subject: [PATCH] chain: do not handle genesis block. --- lib/blockchain/chain.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/blockchain/chain.js b/lib/blockchain/chain.js index b324282b..c78e6f22 100644 --- a/lib/blockchain/chain.js +++ b/lib/blockchain/chain.js @@ -1135,16 +1135,14 @@ Chain.prototype._add = co(function* add(block) { var initial = true; var hash, entry, prev, result; + assert(block); + while (block) { hash = block.hash('hex'); // Mark the start time. this.mark(); - // Special case for genesis block. - if (hash === this.network.genesis.hash) - break; - // Do we already have this block in the queue? if (this.hasPending(hash)) { this.emit('exists', block, block.getCoinbaseHeight());