chg: use new bor flags

This commit is contained in:
Jaynti Kanani 2020-11-18 17:05:20 +05:30
parent 4c5f8153f1
commit 8c7cf1d64f
No known key found for this signature in database
GPG key ID: 4396982C976BAE5E
2 changed files with 9 additions and 0 deletions

View file

@ -146,6 +146,9 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
}
utils.SetShhConfig(ctx, stack)
// Set Bor config flags
utils.SetBorConfig(ctx, &cfg.Eth)
return stack, cfg
}

View file

@ -52,6 +52,12 @@ func getGenesis(genesisPath string) (*core.Genesis, error) {
return genesis, nil
}
// SetBorConfig sets bor config
func SetBorConfig(ctx *cli.Context, cfg *eth.Config) {
cfg.HeimdallURL = ctx.GlobalString(HeimdallURLFlag.Name)
cfg.WithoutHeimdall = ctx.GlobalBool(WithoutHeimdallFlag.Name)
}
// CreateBorEthereum Creates bor ethereum object from eth.Config
func CreateBorEthereum(cfg *eth.Config) *eth.Ethereum {
workspace, err := ioutil.TempDir("", "bor-command-node-")