diff --git a/server/src/geyser_grpc_plugin.rs b/server/src/geyser_grpc_plugin.rs index e18f1f7..426e043 100644 --- a/server/src/geyser_grpc_plugin.rs +++ b/server/src/geyser_grpc_plugin.rs @@ -52,6 +52,7 @@ pub struct PluginData { is_startup_completed: AtomicBool, ignore_startup_updates: bool, + account_data_notifications_enabled: bool, } #[derive(Default)] @@ -75,6 +76,7 @@ pub struct PluginConfig { pub block_update_buffer_size: usize, pub transaction_update_buffer_size: usize, pub skip_startup_stream: Option, + pub account_data_notifications_enabled: Option, } impl GeyserPlugin for GeyserGrpcPlugin { @@ -161,6 +163,7 @@ 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), }); info!("plugin data initialized"); @@ -482,7 +485,7 @@ impl GeyserPlugin for GeyserGrpcPlugin { } fn account_data_notifications_enabled(&self) -> bool { - true + self.data.as_ref().map(|d| d.account_data_notifications_enabled).unwrap_or(true) } fn transaction_notifications_enabled(&self) -> bool {