Skip to content

Commit

Permalink
disallow specify both --p2p.static and --p2p.disable
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiangxu committed Jun 20, 2024
1 parent ebf05d4 commit 4f7bc3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions op-node/p2p/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ const maxMeshParam = 1000

func (conf *Config) Check() error {
if conf.DisableP2P {
if len(conf.StaticPeers) > 0 {
return errors.New("both --p2p.static and --p2p.disable are specified")
}
return nil
}
if conf.Store == nil {
Expand Down

0 comments on commit 4f7bc3a

Please sign in to comment.