good morning!!!!

Skip to content
Snippets Groups Projects
Commit 11bbf0df authored by atvanguard's avatar atvanguard
Browse files

minor: Dont use MakeGenesis because it doesnt have default bor config

parent 2be8ee29
Branches
Tags
No related merge requests found
...@@ -1661,11 +1661,8 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis { ...@@ -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 { ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment