Skip to content

Commit

Permalink
Genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyilong committed Mar 12, 2019
1 parent 8c5a7e0 commit 0666ca1
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package core
const (
MainnetChainID = "mainnet"

MainnetGenesisBlockHash = ""
MainnetGenesisBlockHash = "0x59c9208f7725f5b1f40ade481f075619d79190e10b6c2088e80f923586773297"

GenesisBlockHeight = uint64(0)
)
Binary file added integration/mainnet/validator/genesis
Binary file not shown.
Binary file added integration/mainnet/validator/snapshot
Binary file not shown.
Binary file added integration/mainnet/walletnode/genesis
Binary file not shown.
Binary file added integration/mainnet/walletnode/snapshot
Binary file not shown.
3 changes: 3 additions & 0 deletions snapshot/snapshot_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ func checkGenesisBlock(block *core.BlockHeader, db database.Database) (*core.Val
expectedGenesisHash = viper.GetString(common.CfgGenesisHash)
}

logger.Infof("Expected genesis hash: %v", expectedGenesisHash)
logger.Infof("Acutal genesis hash: %v", block.Hash().Hex())

if block.Hash() != common.HexToHash(expectedGenesisHash) {
return nil, fmt.Errorf("Genesis block hash mismatch, expected: %v, calculated: %v",
expectedGenesisHash, block.Hash().Hex())
Expand Down

0 comments on commit 0666ca1

Please sign in to comment.