mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 15:33:47 +00:00
minor: Dont use MakeGenesis because it doesnt have default bor config
This commit is contained in:
parent
2be8ee294d
commit
11bbf0dfca
1 changed files with 4 additions and 9 deletions
|
|
@ -1661,11 +1661,8 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
|
||||||
return genesis
|
return genesis
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGenesis(ctx *cli.Context) *core.Genesis {
|
func getGenesis(genesisPath string) *core.Genesis {
|
||||||
genesisPath := ctx.Args().Get(len(ctx.Args()) - 1)
|
log.Info("Reading genesis at ", "file", genesisPath)
|
||||||
if genesisPath == "" {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
file, _ := os.Open(genesisPath)
|
file, _ := os.Open(genesisPath)
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
|
|
@ -1676,10 +1673,8 @@ func getGenesis(ctx *cli.Context) *core.Genesis {
|
||||||
|
|
||||||
// MakeChain creates a chain manager from set command line flags.
|
// MakeChain creates a chain manager from set command line flags.
|
||||||
func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chainDb ethdb.Database) {
|
func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chainDb ethdb.Database) {
|
||||||
genesis := getGenesis(ctx)
|
// expecting the last argument to be the genesis file
|
||||||
if genesis == nil {
|
genesis := getGenesis(ctx.Args().Get(len(ctx.Args()) - 1))
|
||||||
genesis = MakeGenesis(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
chainDb = MakeChainDatabase(ctx, stack)
|
chainDb = MakeChainDatabase(ctx, stack)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue