Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(state-operator): Add try_load for State #42

Merged
merged 7 commits into from
Jan 23, 2025

Conversation

AlejandroCabeza
Copy link
Contributor

@AlejandroCabeza AlejandroCabeza commented Dec 30, 2024

Add a try_load function to StateOperator.
This try_load is called before the ServiceState::from_settings, giving a chance to initialise the State from a source different than the settings. E.g.: file, db, etc.

Also updated the examples and added tests.

With this, all should be in place to properly implement Recovery.
Resolves logos-co/nomos-node#959

@AlejandroCabeza AlejandroCabeza added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 30, 2024
@AlejandroCabeza AlejandroCabeza self-assigned this Dec 30, 2024
Copy link
Collaborator

@danielSanchezQ danielSanchezQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok, we can wait for merging and use this as a base branch till we figure it is the way to go.

overwatch-rs/src/services/state.rs Outdated Show resolved Hide resolved
overwatch-rs/src/services/state.rs Outdated Show resolved Hide resolved
overwatch-rs/tests/try_load.rs Outdated Show resolved Hide resolved
@AlejandroCabeza AlejandroCabeza merged commit 1b83775 into main Jan 23, 2025
10 checks passed
@AlejandroCabeza AlejandroCabeza deleted the feature/try-load-state branch January 23, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node recovery implementation (Overwatch)
2 participants