diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-08 18:12:13 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-09 00:33:43 +0800 |
commit | 6244b10a8f74d92addf977994e5a9c0e457229bb (patch) | |
tree | 30ad7e939d001e8a1400b76e4403546777c9f3aa /core/genesis.go | |
parent | c6faa18ec9630066683548ed410e364555fd838d (diff) | |
download | go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.gz go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.bz2 go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.lz go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.xz go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.zst go-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.zip |
core: settable genesis nonce
You can set the nonce of the block with `--genesisnonce`. When the
genesis nonce changes and it doesn't match with the first block in your
database it will fail. A new `datadir` must be given if the nonce of the
genesis block changes.
Diffstat (limited to 'core/genesis.go')
-rw-r--r-- | core/genesis.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/genesis.go b/core/genesis.go index a9b7339f3..dd894e0b0 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -19,8 +19,8 @@ var ZeroHash256 = make([]byte, 32) var ZeroHash160 = make([]byte, 20) var ZeroHash512 = make([]byte, 64) -func GenesisBlock(db common.Database) *types.Block { - genesis := types.NewBlock(common.Hash{}, common.Address{}, common.Hash{}, params.GenesisDifficulty, 42, nil) +func GenesisBlock(nonce uint64, db common.Database) *types.Block { + genesis := types.NewBlock(common.Hash{}, common.Address{}, common.Hash{}, params.GenesisDifficulty, nonce, nil) genesis.Header().Number = common.Big0 genesis.Header().GasLimit = params.GenesisGasLimit genesis.Header().GasUsed = common.Big0 |