Skip to content

Commit 789ce16

Browse files
committed
refactor: remove unused code
1 parent 2493fa3 commit 789ce16

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/bin/pyth_reader.rs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@ async fn fetch_price_updates(jetstream: jetstream::Context, config: &AppConfig)
188188
}
189189
};
190190

191-
// info!(
192-
// "Price Account: {:#?}, account: {:#?} \n\n",
193-
// price_account, account
194-
// );
195-
196191
// We want to send price updates whenever the aggregate changes but sometimes the accounts can change without the aggregate changing
197192
if price_account.agg.status == PriceStatus::Trading
198193
&& (update.context.slot - price_account.agg.pub_slot)
@@ -253,18 +248,13 @@ async fn fetch_price_updates(jetstream: jetstream::Context, config: &AppConfig)
253248
Err(e) => warn!("Failed to publish price update to JetStream: {}", e),
254249
}
255250
});
256-
251+
info!(
252+
"update: {}, comp: {}",
253+
update.context.slot,
254+
price_account.comp.len()
255+
);
257256
for component in price_account.comp {
258257
let publisher = component.publisher.to_string();
259-
let publisher_price_update_message_id = format!(
260-
"{}:{}:{}",
261-
price_update.price_feed.id, price_update.price_feed.price.slot, publisher
262-
);
263-
264-
let mut publisher_price_updates = HeaderMap::new();
265-
publisher_price_updates
266-
.insert("Nats-Msg-Id", publisher_price_update_message_id.as_str());
267-
268258
let publisher_price_update = PublisherPriceUpdate {
269259
feed_id: update.value.pubkey.to_string(),
270260
publisher: publisher.clone(),

0 commit comments

Comments
 (0)