From dce31f60021f10e24bd987a1e97205c632bbb6b9 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 30 Oct 2018 11:47:14 -0700 Subject: [PATCH] Improve account subscribe/unsubscribe logging --- src/rpc_pubsub.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc_pubsub.rs b/src/rpc_pubsub.rs index f5de442e9e..5c487b9c5d 100644 --- a/src/rpc_pubsub.rs +++ b/src/rpc_pubsub.rs @@ -127,7 +127,6 @@ impl RpcSolPubSub for RpcSolPubSubImpl { subscriber: pubsub::Subscriber, pubkey_str: String, ) { - info!("account_subscribe"); let pubkey_vec = bs58::decode(pubkey_str).into_vec().unwrap(); if pubkey_vec.len() != mem::size_of::() { subscriber @@ -142,6 +141,7 @@ impl RpcSolPubSub for RpcSolPubSubImpl { let id = self.uid.fetch_add(1, atomic::Ordering::SeqCst); let sub_id = SubscriptionId::Number(id as u64); + info!("account_subscribe: account={:?} id={:?}", pubkey, sub_id); let sink = subscriber.assign_id(sub_id.clone()).unwrap(); let bank_sub_id = Keypair::new().pubkey(); self.account_subscriptions @@ -154,7 +154,7 @@ impl RpcSolPubSub for RpcSolPubSubImpl { } fn account_unsubscribe(&self, id: SubscriptionId) -> Result { - info!("account_unsubscribe"); + info!("account_unsubscribe: id={:?}", id); if let Some((bank_sub_id, pubkey)) = self.account_subscriptions.write().unwrap().remove(&id) { self.bank.remove_account_subscription(&bank_sub_id, &pubkey);