File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 5
5
"jito-endpoint" : " mainnet.block-engine.jito.wtf" ,
6
6
"jito-keypair-file" : " ./jito.json" ,
7
7
"jito-tip-lamports" : " 100000" ,
8
+ "dynamic-jito-tips" : true ,
8
9
"jito-bundle-size" : " 5" ,
9
10
"updates-per-jito-bundle" : " 6" ,
10
11
"price-config-file" : " ./price-config.yaml" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @pythnetwork/price-pusher" ,
3
- "version" : " 8.2 .0" ,
3
+ "version" : " 8.3 .0" ,
4
4
"description" : " Pyth Price Pusher" ,
5
5
"homepage" : " https://pyth.network" ,
6
6
"main" : " lib/index.js" ,
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ export class SolanaPricePusherJito implements IPricePusher {
181
181
}
182
182
const data = await response . json ( ) ;
183
183
return Math . floor (
184
- Number ( data [ 0 ] . landed_tips_25th_percentile ) * LAMPORTS_PER_SOL
184
+ Number ( data [ 0 ] . landed_tips_50th_percentile ) * LAMPORTS_PER_SOL
185
185
) ;
186
186
} catch ( err : any ) {
187
187
this . logger . error ( { err } , "getRecentJitoTips failed" ) ;
@@ -194,9 +194,11 @@ export class SolanaPricePusherJito implements IPricePusher {
194
194
// eslint-disable-next-line @typescript-eslint/no-unused-vars
195
195
_pubTimesToPush : number [ ]
196
196
) : Promise < void > {
197
- const jitoTip = this . dynamicJitoTips
198
- ? ( await this . getRecentJitoTipLamports ( ) ) ?? this . defaultJitoTipLamports
199
- : this . defaultJitoTipLamports ;
197
+ const recentJitoTip = await this . getRecentJitoTipLamports ( ) ;
198
+ const jitoTip =
199
+ this . dynamicJitoTips && recentJitoTip !== undefined
200
+ ? Math . max ( this . defaultJitoTipLamports , recentJitoTip )
201
+ : this . defaultJitoTipLamports ;
200
202
201
203
const cappedJitoTip = Math . min ( jitoTip , this . maxJitoTipLamports ) ;
202
204
this . logger . info ( { cappedJitoTip } , "using jito tip of" ) ;
You can’t perform that action at this time.
0 commit comments