fix: Multiple network flags should prevent the BN to start (#14169)

* Implement Initial Logic

* Include check in main.go

* Add tests for multiple flags

* remove usage of append

* remove config/features dependency

* Move ValidateNetworkFlags to config/features

* Nit

* removed NetworkFlags from cmd

* remove usage of empty string literal

* add comment

* add flag validation to prysctl validator-exit

---------

Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
This commit is contained in:
kira
2024-07-10 04:08:37 -07:00
committed by GitHub
parent f8950c8c40
commit 7c81c7da90
5 changed files with 82 additions and 0 deletions

View File

@@ -212,6 +212,10 @@ func before(ctx *cli.Context) error {
return errors.Wrap(err, "failed to set max fd limits")
}
if err := features.ValidateNetworkFlags(ctx); err != nil {
return errors.Wrap(err, "provided multiple network flags")
}
return cmd.ValidateNoArgs(ctx)
}