Skip to content

Commit 439378b

Browse files
committed
Add some logs
1 parent 9bb7e72 commit 439378b

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/agent/pythd/api.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,8 @@ pub mod rpc {
589589
with_logger: WithLogger,
590590
config: Config| {
591591
ws.on_upgrade(move |conn| async move {
592+
info!(with_logger.logger, "websocket user connected");
593+
592594
Connection::new(
593595
conn,
594596
adapter_tx,

src/agent/solana/exporter.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ mod transaction_monitor {
592592
}
593593

594594
fn add_transaction(&mut self, signature: Signature) {
595+
debug!(self.logger, "monitoring new transaction"; "signature" => signature.to_string());
596+
595597
// Add the new transaction to the list
596598
self.sent_transactions.push_back(signature);
597599

@@ -622,7 +624,7 @@ mod transaction_monitor {
622624
.count();
623625
let percentage_confirmed =
624626
((confirmed as f64) / (self.sent_transactions.len() as f64)) * 100.0;
625-
info!(self.logger, "monitoring transaction hit rate"; "percentage confirmed" => percentage_confirmed);
627+
info!(self.logger, "monitoring transaction hit rate"; "percentage confirmed" => format!("{:.}", percentage_confirmed));
626628

627629
Ok(())
628630
}

src/agent/solana/oracle.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ mod subscriber {
531531
pub async fn start_shadow(
532532
&self,
533533
) -> Result<broadcast::Receiver<(Pubkey, solana_sdk::account::Account)>> {
534+
debug!(self.logger, "subscribed to account updates"; "account" => self.account_key.to_string());
535+
534536
let shadow = BlockchainShadow::new_for_program(
535537
&self.account_key,
536538
SyncOptions {

0 commit comments

Comments
 (0)