Skip to content

Commit 5f5faaa

Browse files
committed
increase to 50 pct, take max
1 parent 4a350a6 commit 5f5faaa

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

apps/price_pusher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/price-pusher",
3-
"version": "8.2.0",
3+
"version": "8.3.0",
44
"description": "Pyth Price Pusher",
55
"homepage": "https://pyth.network",
66
"main": "lib/index.js",

apps/price_pusher/src/solana/solana.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class SolanaPricePusherJito implements IPricePusher {
181181
}
182182
const data = await response.json();
183183
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
185185
);
186186
} catch (err: any) {
187187
this.logger.error({ err }, "getRecentJitoTips failed");
@@ -194,9 +194,11 @@ export class SolanaPricePusherJito implements IPricePusher {
194194
// eslint-disable-next-line @typescript-eslint/no-unused-vars
195195
_pubTimesToPush: number[]
196196
): 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;
200202

201203
const cappedJitoTip = Math.min(jitoTip, this.maxJitoTipLamports);
202204
this.logger.info({ cappedJitoTip }, "using jito tip of");

0 commit comments

Comments
 (0)