chain: do not handle genesis block.

This commit is contained in:
Christopher Jeffrey 2017-01-28 19:06:15 -08:00
parent 0ec58ca93d
commit 963e812bf9
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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());