File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
apps/price_pusher/src/solana Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111import { Controller } from "../controller" ;
1212import { PythSolanaReceiver } from "@pythnetwork/pyth-solana-receiver" ;
1313import 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" ;
1515import fs from "fs" ;
1616import { PublicKey } from "@solana/web3.js" ;
1717import {
@@ -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
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import { Logger } from "pino";
1717import { LAMPORTS_PER_SOL } from "@solana/web3.js" ;
1818
1919const HEALTH_CHECK_TIMEOUT_SECONDS = 60 ;
20- const MAX_JITO_TIP_LAMPORTS = LAMPORTS_PER_SOL / 100 ;
2120
2221export 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 [ ] ;
You can’t perform that action at this time.
0 commit comments