@@ -33,6 +33,10 @@ import (
3333 "text/template"
3434 "time"
3535
36+ pcsclite "github.com/gballet/go-libpcsclite"
37+ gopsutil "github.com/shirou/gopsutil/mem"
38+ "gopkg.in/urfave/cli.v1"
39+
3640 "github.com/ethereum/go-ethereum/accounts"
3741 "github.com/ethereum/go-ethereum/accounts/keystore"
3842 "github.com/ethereum/go-ethereum/common"
@@ -66,9 +70,6 @@ import (
6670 "github.com/ethereum/go-ethereum/p2p/nat"
6771 "github.com/ethereum/go-ethereum/p2p/netutil"
6872 "github.com/ethereum/go-ethereum/params"
69- pcsclite "github.com/gballet/go-libpcsclite"
70- gopsutil "github.com/shirou/gopsutil/mem"
71- "gopkg.in/urfave/cli.v1"
7273)
7374
7475func init () {
@@ -1205,12 +1206,19 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
12051206 cfg .NetRestrict = list
12061207 }
12071208
1209+ var err error
12081210 if iprestrict := ctx .GlobalString (IPrestrictFlag .Name ); iprestrict != "" {
1209- cfg .IPRestrict = netutil .ParseIPs (iprestrict )
1211+ cfg .IPRestrict , err = netutil .ParseIPs (iprestrict )
1212+ if err != nil {
1213+ Fatalf ("Option %q: %v" , IPrestrictFlag .Name , err )
1214+ }
12101215 }
12111216
12121217 if privatenodes := ctx .GlobalString (PrivateNodeFlag .Name ); privatenodes != "" {
1213- cfg .PrivateNodes = enode .ParseNodes (privatenodes )
1218+ cfg .PrivateNodes , err = enode .ParseNodes (privatenodes )
1219+ if err != nil {
1220+ Fatalf ("Option %q: %v" , PrivateNodeFlag .Name , err )
1221+ }
12141222 }
12151223
12161224 if ctx .GlobalBool (DeveloperFlag .Name ) || ctx .GlobalBool (CatalystFlag .Name ) {
0 commit comments