Skip to content

Commit 0963795

Browse files
committed
refactor: remove warnings
`network` field was not used in some api functions and is therefore removed.
1 parent d13ed5c commit 0963795

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/agent/services/exporter.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ mod exporter {
233233
if let Ok(publish_keypair) = get_publish_keypair(&*state, network, key_store.publish_keypair.as_ref()).await {
234234
if let Ok(permissioned_updates) = Exporter::get_permissioned_updates(
235235
&*state,
236-
network,
237236
&publish_keypair,
238237
config.exporter.staleness_threshold,
239238
config.exporter.unchanged_publish_threshold,
@@ -265,7 +264,6 @@ mod exporter {
265264
if let Ok(publish_keypair) = get_publish_keypair(&*state, network, key_store.publish_keypair.as_ref()).await {
266265
if let Err(err) = Exporter::update_recent_compute_unit_price(
267266
&*state,
268-
network,
269267
&publish_keypair,
270268
&client,
271269
config.exporter.staleness_threshold,

src/agent/state/exporter.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,13 @@ where
101101
async fn record_publish(&self, batch_state: HashMap<Identifier, PriceInfo>);
102102
async fn get_permissioned_updates(
103103
&self,
104-
network: Network,
105104
publish_keypair: &Keypair,
106105
staleness_threshold: Duration,
107106
unchanged_publish_threshold: Duration,
108107
) -> Result<Vec<(pyth_sdk::Identifier, PriceInfo)>>;
109108
async fn get_recent_compute_unit_price_micro_lamports(&self) -> Option<u64>;
110109
async fn update_recent_compute_unit_price(
111110
&self,
112-
network: Network,
113111
publish_keypair: &Keypair,
114112
rpc_client: &RpcClient,
115113
staleness_threshold: Duration,
@@ -150,7 +148,6 @@ where
150148

151149
async fn get_permissioned_updates(
152150
&self,
153-
network: Network,
154151
publish_keypair: &Keypair,
155152
staleness_threshold: Duration,
156153
unchanged_publish_threshold: Duration,
@@ -259,15 +256,13 @@ where
259256

260257
async fn update_recent_compute_unit_price(
261258
&self,
262-
network: Network,
263259
publish_keypair: &Keypair,
264260
rpc_client: &RpcClient,
265261
staleness_threshold: Duration,
266262
unchanged_publish_threshold: Duration,
267263
) -> Result<()> {
268264
let permissioned_updates = self
269265
.get_permissioned_updates(
270-
network,
271266
publish_keypair,
272267
staleness_threshold,
273268
unchanged_publish_threshold,

src/agent/state/oracle.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
#[allow(deprecated)]
2+
use crate::agent::legacy_schedule::LegacySchedule;
13
use {
24
super::{
35
super::solana::network::Network,
46
exporter::Exporter,
57
},
68
crate::agent::{
7-
legacy_schedule::LegacySchedule,
89
market_schedule::MarketSchedule,
910
state::{
1011
global::Update,

0 commit comments

Comments
 (0)