@@ -47,6 +47,7 @@ const char *gengetopt_args_info_detailed_help[] = {
4747 " This option starts the node with a temporary empty chain database." ,
4848 " --testnet Enable testnet" ,
4949 " --disable-tx-mining Don't mine transactions (in case of bugs)" ,
50+ " --minfee=STRING Set minimal transaction fee accepted by this node,\n defaults to 0.01" ,
5051 "\nData file options:" ,
5152 " --chain-db=STRING specify chain data file" ,
5253 " Defaults to ~/.warthog/chain.db3 in Linux, %LOCALAPPDATA%/Warthog/chain.db3\n on Windows.'" ,
@@ -82,8 +83,8 @@ init_help_array(void)
8283 gengetopt_args_info_help [9 ] = gengetopt_args_info_detailed_help [12 ];
8384 gengetopt_args_info_help [10 ] = gengetopt_args_info_detailed_help [13 ];
8485 gengetopt_args_info_help [11 ] = gengetopt_args_info_detailed_help [14 ];
85- gengetopt_args_info_help [12 ] = gengetopt_args_info_detailed_help [16 ];
86- gengetopt_args_info_help [13 ] = gengetopt_args_info_detailed_help [18 ];
86+ gengetopt_args_info_help [12 ] = gengetopt_args_info_detailed_help [15 ];
87+ gengetopt_args_info_help [13 ] = gengetopt_args_info_detailed_help [17 ];
8788 gengetopt_args_info_help [14 ] = gengetopt_args_info_detailed_help [19 ];
8889 gengetopt_args_info_help [15 ] = gengetopt_args_info_detailed_help [20 ];
8990 gengetopt_args_info_help [16 ] = gengetopt_args_info_detailed_help [21 ];
@@ -94,11 +95,12 @@ init_help_array(void)
9495 gengetopt_args_info_help [21 ] = gengetopt_args_info_detailed_help [26 ];
9596 gengetopt_args_info_help [22 ] = gengetopt_args_info_detailed_help [27 ];
9697 gengetopt_args_info_help [23 ] = gengetopt_args_info_detailed_help [28 ];
97- gengetopt_args_info_help [24 ] = 0 ;
98+ gengetopt_args_info_help [24 ] = gengetopt_args_info_detailed_help [29 ];
99+ gengetopt_args_info_help [25 ] = 0 ;
98100
99101}
100102
101- const char * gengetopt_args_info_help [25 ];
103+ const char * gengetopt_args_info_help [26 ];
102104
103105typedef enum {ARG_NO
104106 , ARG_STRING
@@ -129,6 +131,7 @@ void clear_given (struct gengetopt_args_info *args_info)
129131 args_info -> temporary_given = 0 ;
130132 args_info -> testnet_given = 0 ;
131133 args_info -> disable_tx_mining_given = 0 ;
134+ args_info -> minfee_given = 0 ;
132135 args_info -> chain_db_given = 0 ;
133136 args_info -> peers_db_given = 0 ;
134137 args_info -> debug_given = 0 ;
@@ -149,6 +152,8 @@ void clear_args (struct gengetopt_args_info *args_info)
149152 args_info -> bind_orig = NULL ;
150153 args_info -> connect_arg = NULL ;
151154 args_info -> connect_orig = NULL ;
155+ args_info -> minfee_arg = NULL ;
156+ args_info -> minfee_orig = NULL ;
152157 args_info -> chain_db_arg = NULL ;
153158 args_info -> chain_db_orig = NULL ;
154159 args_info -> peers_db_arg = NULL ;
@@ -178,16 +183,17 @@ void init_args_info(struct gengetopt_args_info *args_info)
178183 args_info -> temporary_help = gengetopt_args_info_detailed_help [9 ] ;
179184 args_info -> testnet_help = gengetopt_args_info_detailed_help [11 ] ;
180185 args_info -> disable_tx_mining_help = gengetopt_args_info_detailed_help [12 ] ;
181- args_info -> chain_db_help = gengetopt_args_info_detailed_help [14 ] ;
182- args_info -> peers_db_help = gengetopt_args_info_detailed_help [16 ] ;
183- args_info -> debug_help = gengetopt_args_info_detailed_help [19 ] ;
184- args_info -> rpc_help = gengetopt_args_info_detailed_help [21 ] ;
185- args_info -> publicrpc_help = gengetopt_args_info_detailed_help [22 ] ;
186- args_info -> stratum_help = gengetopt_args_info_detailed_help [23 ] ;
187- args_info -> enable_public_help = gengetopt_args_info_detailed_help [24 ] ;
188- args_info -> config_help = gengetopt_args_info_detailed_help [26 ] ;
189- args_info -> test_help = gengetopt_args_info_detailed_help [27 ] ;
190- args_info -> dump_config_help = gengetopt_args_info_detailed_help [28 ] ;
186+ args_info -> minfee_help = gengetopt_args_info_detailed_help [13 ] ;
187+ args_info -> chain_db_help = gengetopt_args_info_detailed_help [15 ] ;
188+ args_info -> peers_db_help = gengetopt_args_info_detailed_help [17 ] ;
189+ args_info -> debug_help = gengetopt_args_info_detailed_help [20 ] ;
190+ args_info -> rpc_help = gengetopt_args_info_detailed_help [22 ] ;
191+ args_info -> publicrpc_help = gengetopt_args_info_detailed_help [23 ] ;
192+ args_info -> stratum_help = gengetopt_args_info_detailed_help [24 ] ;
193+ args_info -> enable_public_help = gengetopt_args_info_detailed_help [25 ] ;
194+ args_info -> config_help = gengetopt_args_info_detailed_help [27 ] ;
195+ args_info -> test_help = gengetopt_args_info_detailed_help [28 ] ;
196+ args_info -> dump_config_help = gengetopt_args_info_detailed_help [29 ] ;
191197
192198}
193199
@@ -290,6 +296,8 @@ cmdline_parser_release (struct gengetopt_args_info *args_info)
290296 free_string_field (& (args_info -> bind_orig ));
291297 free_string_field (& (args_info -> connect_arg ));
292298 free_string_field (& (args_info -> connect_orig ));
299+ free_string_field (& (args_info -> minfee_arg ));
300+ free_string_field (& (args_info -> minfee_orig ));
293301 free_string_field (& (args_info -> chain_db_arg ));
294302 free_string_field (& (args_info -> chain_db_orig ));
295303 free_string_field (& (args_info -> peers_db_arg ));
@@ -350,6 +358,8 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
350358 write_into_file (outfile , "testnet" , 0 , 0 );
351359 if (args_info -> disable_tx_mining_given )
352360 write_into_file (outfile , "disable-tx-mining" , 0 , 0 );
361+ if (args_info -> minfee_given )
362+ write_into_file (outfile , "minfee" , args_info -> minfee_orig , 0 );
353363 if (args_info -> chain_db_given )
354364 write_into_file (outfile , "chain-db" , args_info -> chain_db_orig , 0 );
355365 if (args_info -> peers_db_given )
@@ -622,6 +632,7 @@ cmdline_parser_internal (
622632 { "temporary" , 0 , NULL , 0 },
623633 { "testnet" , 0 , NULL , 0 },
624634 { "disable-tx-mining" , 0 , NULL , 0 },
635+ { "minfee" , 1 , NULL , 0 },
625636 { "chain-db" , 1 , NULL , 0 },
626637 { "peers-db" , 1 , NULL , 0 },
627638 { "debug" , 0 , NULL , 'd' },
@@ -786,6 +797,20 @@ cmdline_parser_internal (
786797 additional_error ))
787798 goto failure ;
788799
800+ }
801+ /* Set minimal transaction fee accepted by this node, defaults to 0.01. */
802+ else if (strcmp (long_options [option_index ].name , "minfee" ) == 0 )
803+ {
804+
805+
806+ if (update_arg ( (void * )& (args_info -> minfee_arg ),
807+ & (args_info -> minfee_orig ), & (args_info -> minfee_given ),
808+ & (local_args_info .minfee_given ), optarg , 0 , 0 , ARG_STRING ,
809+ check_ambiguity , override , 0 , 0 ,
810+ "minfee" , '-' ,
811+ additional_error ))
812+ goto failure ;
813+
789814 }
790815 /* specify chain data file. */
791816 else if (strcmp (long_options [option_index ].name , "chain-db" ) == 0 )
0 commit comments