Skip to content

Commit

Permalink
Fix console cmd for suave devnet (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt authored Dec 14, 2023
1 parent 42abfe5 commit 6de1fdf
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ func main() {
// prepare manipulates memory cache allowance and setups metric system.
// This function should be called before launching devp2p stack.
func prepare(ctx *cli.Context) {
if err := prepareSuaveDev(ctx); err != nil {
log.Error("failed to setup suave dev mode", "err", err)
os.Exit(1)
}

if err := prepareSuaveNetworksRemapping(ctx); err != nil {
log.Error("failed to setup suave networks remapping", "err", err)
os.Exit(1)
}

// If we're running a known preset, log it for convenience.
switch {
case ctx.IsSet(utils.RinkebyFlag.Name):
Expand Down Expand Up @@ -340,14 +350,6 @@ func geth(ctx *cli.Context) error {
return fmt.Errorf("invalid command: %q", args[0])
}

if err := prepareSuaveDev(ctx); err != nil {
return fmt.Errorf("failed to setup suave development mode: %v", err)
}

if err := prepareSuaveNetworksRemapping(ctx); err != nil {
return err
}

prepare(ctx)
stack, backend := makeFullNode(ctx)
defer stack.Close()
Expand Down

0 comments on commit 6de1fdf

Please sign in to comment.