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.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user