aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_makers.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-08 18:12:13 +0800
committerobscuren <geffobscura@gmail.com>2015-06-09 00:33:43 +0800
commit6244b10a8f74d92addf977994e5a9c0e457229bb (patch)
tree30ad7e939d001e8a1400b76e4403546777c9f3aa /core/chain_makers.go
parentc6faa18ec9630066683548ed410e364555fd838d (diff)
downloadgo-tangerine-6244b10a8f74d92addf977994e5a9c0e457229bb.tar.gz
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/chain_makers.go')
-rw-r--r--core/chain_makers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/chain_makers.go b/core/chain_makers.go
index 3039e52da..4e685f599 100644
--- a/core/chain_makers.go
+++ b/core/chain_makers.go
@@ -108,7 +108,7 @@ func makeChain(bman *BlockProcessor, parent *types.Block, max int, db common.Dat
// Create a new chain manager starting from given block
// Effectively a fork factory
func newChainManager(block *types.Block, eventMux *event.TypeMux, db common.Database) *ChainManager {
- genesis := GenesisBlock(db)
+ genesis := GenesisBlock(0, db)
bc := &ChainManager{blockDb: db, stateDb: db, genesisBlock: genesis, eventMux: eventMux, pow: FakePow{}}
bc.txState = state.ManageState(state.New(genesis.Root(), db))
bc.futureBlocks = NewBlockCache(1000)