Use network-specific genesis hash.

The test in checkConnectBlock for whether or not the node is the genesis
block needs to account for the genesis block of the specified network.
This commit is contained in:
Dave Collins 2013-07-29 20:21:24 -05:00
parent 04d88d01ec
commit 829f187e47

View file

@ -712,7 +712,7 @@ func (b *BlockChain) checkConnectBlock(node *blockNode, block *btcutil.Block) er
// The coinbase for the Genesis block is not spendable, so just return // The coinbase for the Genesis block is not spendable, so just return
// now. // now.
if node.hash.IsEqual(&btcwire.GenesisHash) { if node.hash.IsEqual(b.netParams().genesisHash) {
return nil return nil
} }