diff --git a/CHANGELOG.md b/CHANGELOG.md index 19f2641c..85527534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ The minor version will be incremented upon a breaking change and the patch versi ### Fixes +- Trigger end of startup when parent slot 0 seen in `update_slot_status` notification because `notify_end_of_startup` is not triggered when cluster started from genesis ([#207](https://github.com/rpcpool/yellowstone-grpc/pull/207)) + ### Features ### Breaking diff --git a/yellowstone-grpc-geyser/src/plugin.rs b/yellowstone-grpc-geyser/src/plugin.rs index 7b7a289b..47816f30 100644 --- a/yellowstone-grpc-geyser/src/plugin.rs +++ b/yellowstone-grpc-geyser/src/plugin.rs @@ -174,6 +174,13 @@ impl GeyserPlugin for Plugin { status: SlotStatus, ) -> PluginResult<()> { let inner = self.inner.as_ref().expect("initialized"); + // if plugin run on genesis of network, notify_end_of_startup will not be triggered, and slot 0 will not + // come through this function. + if parent == Some(0) { + inner + .startup_status + .fetch_or(STARTUP_END_OF_RECEIVED, Ordering::SeqCst); + } if inner.startup_status.load(Ordering::SeqCst) == STARTUP_END_OF_RECEIVED && status == SlotStatus::Processed {