Skip to content

Commit

Permalink
Do not use is_startup_completed
Browse files Browse the repository at this point in the history
  • Loading branch information
ebin-mathews committed Nov 14, 2024
1 parent a78cdb0 commit 9814090
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions server/src/geyser_grpc_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ impl GeyserPlugin for GeyserGrpcPlugin {
is_startup_completed: AtomicBool::new(false),
// don't skip startup to keep backwards compatability
ignore_startup_updates: config.skip_startup_stream.unwrap_or(false),
account_data_notifications_enabled: config.account_data_notifications_enabled.unwrap_or(true),
account_data_notifications_enabled: config
.account_data_notifications_enabled
.unwrap_or(true),
});
info!("plugin data initialized");

Expand Down Expand Up @@ -522,7 +524,10 @@ impl GeyserPlugin for GeyserGrpcPlugin {
}

fn account_data_notifications_enabled(&self) -> bool {
self.data.as_ref().map(|d| d.account_data_notifications_enabled).unwrap_or(true)
self.data
.as_ref()
.map(|d| d.account_data_notifications_enabled)
.unwrap_or(true)
}

fn transaction_notifications_enabled(&self) -> bool {
Expand All @@ -536,10 +541,6 @@ impl GeyserPlugin for GeyserGrpcPlugin {
fn notify_entry(&self, entry: ReplicaEntryInfoVersions) -> PluginResult<()> {
let data = self.data.as_ref().expect("plugin must be initialized");

if data.ignore_startup_updates && !data.is_startup_completed.load(Ordering::Relaxed) {
return Ok(());
}

let slot_entry = utils::get_slot_and_index_from_replica_entry_info_versions(&entry);

debug!(
Expand Down

0 comments on commit 9814090

Please sign in to comment.