Skip to content

Commit 7669f24

Browse files
committed
test
1 parent 1583c8a commit 7669f24

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

apps/price_pusher/src/solana/command.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { Controller } from "../controller";
1212
import { PythSolanaReceiver } from "@pythnetwork/pyth-solana-receiver";
1313
import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet";
14-
import { Keypair, Connection } from "@solana/web3.js";
14+
import { Keypair, Connection, LAMPORTS_PER_SOL } from "@solana/web3.js";
1515
import fs from "fs";
1616
import { PublicKey } from "@solana/web3.js";
1717
import {
@@ -66,6 +66,11 @@ export default {
6666
type: "boolean",
6767
default: false,
6868
} as Options,
69+
"max-jito-tip-lamports": {
70+
description: "Maximum jito tip lamports",
71+
type: "number",
72+
default: LAMPORTS_PER_SOL / 100,
73+
} as Options,
6974
"jito-bundle-size": {
7075
description: "Number of transactions in each bundle",
7176
type: "number",
@@ -100,6 +105,7 @@ export default {
100105
jitoKeypairFile,
101106
jitoTipLamports,
102107
dynamicJitoTips,
108+
maxJitoTipLamports,
103109
jitoBundleSize,
104110
updatesPerJitoBundle,
105111
logLevel,
@@ -155,6 +161,7 @@ export default {
155161
shardId,
156162
jitoTipLamports,
157163
dynamicJitoTips,
164+
maxJitoTipLamports,
158165
jitoClient,
159166
jitoBundleSize,
160167
updatesPerJitoBundle

apps/price_pusher/src/solana/solana.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { Logger } from "pino";
1717
import { LAMPORTS_PER_SOL } from "@solana/web3.js";
1818

1919
const HEALTH_CHECK_TIMEOUT_SECONDS = 60;
20-
const MAX_JITO_TIP_LAMPORTS = LAMPORTS_PER_SOL / 100;
2120

2221
export class SolanaPriceListener extends ChainPriceListener {
2322
constructor(
@@ -159,6 +158,7 @@ export class SolanaPricePusherJito implements IPricePusher {
159158
private shardId: number,
160159
private defaultJitoTipLamports: number,
161160
private dynamicJitoTips: boolean,
161+
private maxJitoTipLamports: number,
162162
private searcherClient: SearcherClient,
163163
private jitoBundleSize: number,
164164
private updatesPerJitoBundle: number
@@ -195,7 +195,7 @@ export class SolanaPricePusherJito implements IPricePusher {
195195
? (await this.getRecentJitoTipLamports()) ?? this.defaultJitoTipLamports
196196
: this.defaultJitoTipLamports;
197197

198-
const cappedJitoTip = Math.min(jitoTip, MAX_JITO_TIP_LAMPORTS);
198+
const cappedJitoTip = Math.min(jitoTip, this.maxJitoTipLamports);
199199
this.logger.info({ cappedJitoTip }, "using jito tip of");
200200

201201
let priceFeedUpdateData: string[];

0 commit comments

Comments
 (0)