do not connect the genesis block.

This commit is contained in:
Christopher Jeffrey 2016-04-28 01:41:29 -07:00
parent f2a35c46c2
commit 214a78acbf
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -783,6 +783,10 @@ ChainDB.prototype.connectBlock = function connectBlock(block, batch, callback) {
return utils.nextTick(callback);
}
// Genesis block's coinbase is unspendable.
if (block.hash('hex') === network.genesis.hash)
return utils.nextTick(callback);
this._ensureBlock(block, function(err, block) {
if (err)
return callback(err);