chain: do not handle genesis block.
This commit is contained in:
parent
0ec58ca93d
commit
963e812bf9
@ -1135,16 +1135,14 @@ Chain.prototype._add = co(function* add(block) {
|
|||||||
var initial = true;
|
var initial = true;
|
||||||
var hash, entry, prev, result;
|
var hash, entry, prev, result;
|
||||||
|
|
||||||
|
assert(block);
|
||||||
|
|
||||||
while (block) {
|
while (block) {
|
||||||
hash = block.hash('hex');
|
hash = block.hash('hex');
|
||||||
|
|
||||||
// Mark the start time.
|
// Mark the start time.
|
||||||
this.mark();
|
this.mark();
|
||||||
|
|
||||||
// Special case for genesis block.
|
|
||||||
if (hash === this.network.genesis.hash)
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Do we already have this block in the queue?
|
// Do we already have this block in the queue?
|
||||||
if (this.hasPending(hash)) {
|
if (this.hasPending(hash)) {
|
||||||
this.emit('exists', block, block.getCoinbaseHeight());
|
this.emit('exists', block, block.getCoinbaseHeight());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user