Skip to content

Commit

Permalink
Convert network compatibility error to warning
Browse files Browse the repository at this point in the history
Replace the hard error when running P2P on non-Sepolia networks with a warning message.
This allows users to run P2P on custom networks that are compatible with Starknet v0.12.3 blocks.
  • Loading branch information
wojciechos committed Oct 25, 2024
1 parent 8ca9307 commit f946242
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ func New(cfg *Config, version string) (*Node, error) { //nolint:gocyclo,funlen
var p2pService *p2p.Service
if cfg.P2P {
if cfg.Network != utils.Sepolia {
return nil, fmt.Errorf("P2P can only be used for %v network. Provided network: %v", utils.Sepolia, cfg.Network)
log.Warnw("Running P2P on a non-Sepolia network. Network must use blocks compatible with Starknet v0.12.3 (since block 0)",
"current_network", cfg.Network)
}
log.Warnw("P2P features enabled. Please note P2P is in experimental stage")

Expand Down

0 comments on commit f946242

Please sign in to comment.