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

isDateRecent(), isDisconnected(), isInitializing() #7

Merged
merged 20 commits into from
Apr 24, 2020

Conversation

simzzz
Copy link
Contributor

@simzzz simzzz commented Apr 13, 2020

No description provided.

@simzzz simzzz requested a review from elpiel April 13, 2020 09:20
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
@simzzz simzzz changed the base branch from issue-5-health-function to master April 13, 2020 16:11
src/status.rs Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
@simzzz simzzz requested a review from elpiel April 21, 2020 08:10
@simzzz simzzz changed the title 「WIP」isDateRecent(), isDisconnected(), isInitializing() isDateRecent(), isDisconnected(), isInitializing() Apr 21, 2020
src/status.rs Show resolved Hide resolved
let messages = Messages {
leader: LastApprovedResponse {
last_approved: Some(LastApproved {
new_state: Some(new_state),
Copy link
Member

Choose a reason for hiding this comment

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

Is this the same test from the Market?
https://github.com/AdExNetwork/adex-market/blob/master/test/validatorTestMessages.js#L165

If so, they are a bit different, maybe you can elaborate on that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the initializing state is when there are no messages at all for at least one validator. This is the case where both validators have messages therefore it's false. The difference is that here there is also a newState and an approveState. I will add another with only heartbeats (both should be false)

src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
src/status.rs Outdated Show resolved Hide resolved
@simzzz simzzz requested a review from elpiel April 23, 2020 19:52
Copy link
Member

@elpiel elpiel left a comment

Choose a reason for hiding this comment

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

LGTM

@elpiel elpiel merged commit 8b028bd into master Apr 24, 2020
@elpiel elpiel deleted the date-initializing-disconnected branch April 24, 2020 14:05
@elpiel elpiel mentioned this pull request May 22, 2020
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants