Skip to content

Commit

Permalink
geyser: signal end of startup for genesis cluster (#207) (#210)
Browse files Browse the repository at this point in the history
(cherry picked from commit 05d09b7)

Co-authored-by: Liam Vovk <[email protected]>
  • Loading branch information
mergify[bot] and vovkman authored Oct 17, 2023
1 parent e431248 commit a966b41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions yellowstone-grpc-geyser/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit a966b41

Please sign in to comment.