@@ -72,6 +72,10 @@ int usage()
7272 std::cerr << " -d" << std::endl;
7373 std::cerr << " Turn on debug logging. Can also toggle this on/off via "
7474 " kill -s SIGUSR1 <pid>\n " << std::endl;
75+ std::cerr << " -u" << std::endl;
76+ std::cerr << " Number of compute units requested by each upd_price transaction (default 20000)" << std::endl;
77+ std::cerr << " -v" << std::endl;
78+ std::cerr << " Price per compute unit for each upd_price transaction, in micro lamports (default 31250)" << std::endl;
7579 return 1 ;
7680}
7781
@@ -104,6 +108,8 @@ int main(int argc, char **argv)
104108 int pyth_port = get_port ();
105109 int opt = 0 ;
106110 int pub_int = 1000 ;
111+ unsigned cu_units = 20000 ;
112+ unsigned cu_price = 31250 ;
107113 unsigned max_batch_size = 0 ;
108114 bool do_wait = true , do_tx = true , do_ws = true , do_debug = false ;
109115 while ( (opt = ::getopt (argc,argv, " r:s:t:p:i:k:w:c:l:m:b:dnxhz" )) != -1 ) {
@@ -123,6 +129,8 @@ int main(int argc, char **argv)
123129 case ' x' : do_tx = false ; break ;
124130 case ' z' : do_ws = false ; break ;
125131 case ' d' : do_debug = true ; break ;
132+ case ' u' : cu_units = strtoul (optarg, NULL , 0 ); break ;
133+ case ' v' : cu_price = strtoul (optarg, NULL , 0 ); break ;
126134 default : return usage ();
127135 }
128136 }
@@ -153,6 +161,8 @@ int main(int argc, char **argv)
153161 mgr.set_do_capture ( !cap_file.empty () );
154162 mgr.set_commitment ( cmt );
155163 mgr.set_publish_interval ( pub_int );
164+ mgr.set_requested_upd_price_cu_units ( cu_units );
165+ mgr.set_requested_upd_price_cu_price ( cu_price );
156166
157167 bool do_secondary = !secondary_rpc_host.empty ();
158168 if ( do_secondary ) {
0 commit comments