Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrena-Corto committed Oct 9, 2024
1 parent 194c428 commit 7065058
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions plugin/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl GeyserPlugin for SablierPlugin {

// Goal of this is to catch up on any existing threads that were created before the plugin was loaded.
{
info!("Loading previously existing Threads..");
info!("Loading previously existing Threads...");
let observers = self.inner.observers.clone();
self.inner.clone().spawn(|inner| async move {
info!("Fetch existing Thread pdas...");
Expand All @@ -69,6 +69,7 @@ impl GeyserPlugin for SablierPlugin {
// Filter to retrieve only Thread PDAs
let account_type_filter =
RpcFilterType::Memcmp(Memcmp::new_base58_encoded(0, &Thread::discriminator()));
info!("here");
let config = RpcProgramAccountsConfig {
filters: Some([vec![account_type_filter]].concat()),
account_config: RpcAccountInfoConfig {
Expand All @@ -77,7 +78,7 @@ impl GeyserPlugin for SablierPlugin {
},
..RpcProgramAccountsConfig::default()
};

info!("here2");
// Fetch Thread pdas
let thread_pdas = rpc_client
.get_program_accounts_with_config(&program_id, config)
Expand All @@ -93,10 +94,17 @@ impl GeyserPlugin for SablierPlugin {
.map(|thread| (pubkey, thread))
})
.collect();
info!(" - after deserialization: {} Thread PDAs left", versioned_thread_pdas.len());

info!("Adding {} fetched Thread pdas to observers...", versioned_thread_pdas.len());
info!(
" - after deserialization: {} Thread PDAs left",
versioned_thread_pdas.len()
);

info!(
"Adding {} fetched Thread pdas to observers...",
versioned_thread_pdas.len()
);
for (pubkey, thread) in versioned_thread_pdas {
info!("here3");
observers
.thread
.clone()
Expand Down

0 comments on commit 7065058

Please sign in to comment.