@@ -33,7 +33,6 @@ struct Miner {
33
33
pub priority_fee : Option < u64 > ,
34
34
pub dynamic_fee_url : Option < String > ,
35
35
pub dynamic_fee_strategy : Option < String > ,
36
- pub dynamic_fee_max : Option < u64 > ,
37
36
pub rpc_client : Arc < RpcClient > ,
38
37
pub fee_payer_filepath : Option < String > ,
39
38
}
@@ -61,7 +60,7 @@ enum Commands {
61
60
#[ command( about = "Start mining" ) ]
62
61
Mine ( MineArgs ) ,
63
62
64
- #[ command( about = "Proof " ) ]
63
+ #[ command( about = "Fetch a proof account by address " ) ]
65
64
Proof ( ProofArgs ) ,
66
65
67
66
#[ command( about = "Fetch the current reward rate for each difficulty level" ) ]
@@ -109,24 +108,24 @@ struct Args {
109
108
#[ arg(
110
109
long,
111
110
value_name = "FEE_PAYER_FILEPATH" ,
112
- help = "Filepath to keypair to use for fee payer" ,
111
+ help = "Filepath to keypair to use as transaction fee payer" ,
113
112
global = true
114
113
) ]
115
- fee_payer_filepath : Option < String > ,
114
+ fee_payer : Option < String > ,
116
115
117
116
#[ arg(
118
117
long,
119
118
value_name = "MICROLAMPORTS" ,
120
- help = "Number of microlamports to pay as priority fee per transaction " ,
121
- default_value = "0 " ,
119
+ help = "Price to pay for compute unit. If dynamic fee url is also set, this value will be the max. " ,
120
+ default_value = "500000 " ,
122
121
global = true
123
122
) ]
124
123
priority_fee : Option < u64 > ,
125
124
126
125
#[ arg(
127
126
long,
128
127
value_name = "DYNAMIC_FEE_URL" ,
129
- help = "RPC URL to use for dynamic fee estimation. If set will enable dynamic fee pricing instead of static priority fee pricing. " ,
128
+ help = "RPC URL to use for dynamic fee estimation." ,
130
129
global = true
131
130
) ]
132
131
dynamic_fee_url : Option < String > ,
@@ -139,14 +138,6 @@ struct Args {
139
138
global = true
140
139
) ]
141
140
dynamic_fee_strategy : Option < String > ,
142
- #[ arg(
143
- long,
144
- value_name = "DYNAMIC_FEE_MAX" ,
145
- help = "Maximum priority fee to use for dynamic fee estimation." ,
146
- default_value = "500000" ,
147
- global = true
148
- ) ]
149
- dynamic_fee_max : Option < u64 > ,
150
141
151
142
#[ command( subcommand) ]
152
143
command : Commands ,
@@ -171,9 +162,7 @@ async fn main() {
171
162
// Initialize miner.
172
163
let cluster = args. rpc . unwrap_or ( cli_config. json_rpc_url ) ;
173
164
let default_keypair = args. keypair . unwrap_or ( cli_config. keypair_path . clone ( ) ) ;
174
- let fee_payer_filepath = args
175
- . fee_payer_filepath
176
- . unwrap_or ( cli_config. keypair_path . clone ( ) ) ;
165
+ let fee_payer_filepath = args. fee_payer . unwrap_or ( cli_config. keypair_path . clone ( ) ) ;
177
166
let rpc_client = RpcClient :: new_with_commitment ( cluster, CommitmentConfig :: confirmed ( ) ) ;
178
167
179
168
let miner = Arc :: new ( Miner :: new (
@@ -182,7 +171,6 @@ async fn main() {
182
171
Some ( default_keypair) ,
183
172
args. dynamic_fee_url ,
184
173
args. dynamic_fee_strategy ,
185
- args. dynamic_fee_max ,
186
174
Some ( fee_payer_filepath) ,
187
175
) ) ;
188
176
@@ -235,7 +223,6 @@ impl Miner {
235
223
keypair_filepath : Option < String > ,
236
224
dynamic_fee_url : Option < String > ,
237
225
dynamic_fee_strategy : Option < String > ,
238
- dynamic_fee_max : Option < u64 > ,
239
226
fee_payer_filepath : Option < String > ,
240
227
) -> Self {
241
228
Self {
@@ -244,7 +231,6 @@ impl Miner {
244
231
priority_fee,
245
232
dynamic_fee_url,
246
233
dynamic_fee_strategy,
247
- dynamic_fee_max,
248
234
fee_payer_filepath,
249
235
}
250
236
}
0 commit comments