cmd, core, eth, common: genesis preparation
Implemented the --genesis flag thru which we can set a custom genesis block, including the official Ethereum genesis block.
This commit is contained in:
@ -39,7 +39,7 @@ func ExampleGenerateChain() {
|
||||
)
|
||||
|
||||
// Ensure that key1 has some funds in the genesis block.
|
||||
genesis := GenesisBlockForTesting(db, addr1, big.NewInt(1000000))
|
||||
genesis := WriteGenesisBlockForTesting(db, addr1, big.NewInt(1000000))
|
||||
|
||||
// This call generates a chain of 5 blocks. The function runs for
|
||||
// each block and adds different features to gen based on the
|
||||
@ -74,7 +74,7 @@ func ExampleGenerateChain() {
|
||||
|
||||
// Import the chain. This runs all block validation rules.
|
||||
evmux := &event.TypeMux{}
|
||||
chainman, _ := NewChainManager(genesis, db, db, db, FakePow{}, evmux)
|
||||
chainman, _ := NewChainManager(db, db, db, FakePow{}, evmux)
|
||||
chainman.SetProcessor(NewBlockProcessor(db, db, FakePow{}, chainman, evmux))
|
||||
if i, err := chainman.InsertChain(chain); err != nil {
|
||||
fmt.Printf("insert error (block %d): %v\n", i, err)
|
||||
|
Reference in New Issue
Block a user