File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1176,6 +1176,10 @@ bool AppInitParameterInteraction(const ArgsManager& args)
1176
1176
1177
1177
nMaxTipAge = args.GetArg (" -maxtipage" , DEFAULT_MAX_TIP_AGE);
1178
1178
1179
+ if (args.IsArgSet (" -proxy" ) && args.GetArg (" -proxy" , " " ).empty ()) {
1180
+ return InitError (_ (" No proxy server specified. Use -proxy=<ip> or -proxy=<ip:port>." ));
1181
+ }
1182
+
1179
1183
return true ;
1180
1184
}
1181
1185
Original file line number Diff line number Diff line change @@ -78,6 +78,12 @@ def test_config_file_parser(self):
78
78
with open (inc_conf_file2_path , 'w' , encoding = 'utf-8' ) as conf :
79
79
conf .write ('' ) # clear
80
80
81
+ def test_invalid_command_line_options (self ):
82
+ self .nodes [0 ].assert_start_raises_init_error (
83
+ expected_msg = 'Error: No proxy server specified. Use -proxy=<ip> or -proxy=<ip:port>.' ,
84
+ extra_args = ['-proxy' ],
85
+ )
86
+
81
87
def test_log_buffer (self ):
82
88
with self .nodes [0 ].assert_debug_log (expected_msgs = ['Warning: parsed potentially confusing double-negative -connect=0\n ' ]):
83
89
self .start_node (0 , extra_args = ['-noconnect=0' ])
@@ -146,6 +152,7 @@ def run_test(self):
146
152
self .test_networkactive ()
147
153
148
154
self .test_config_file_parser ()
155
+ self .test_invalid_command_line_options ()
149
156
150
157
# Remove the -datadir argument so it doesn't override the config file
151
158
self .nodes [0 ].args = [arg for arg in self .nodes [0 ].args if not arg .startswith ("-datadir" )]
You can’t perform that action at this time.
0 commit comments