Skip to content

Commit

Permalink
add vibe check to CHILLIN
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Jun 8, 2024
1 parent dfa4022 commit 0684927
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ public void checkViews() {

@Override
public void chill() {
countdown.set(-1);
if (ViewAssembly.this.checkAssembly()) {
transitions.certified();
} else {
Expand Down Expand Up @@ -456,5 +457,12 @@ public void finish() {
public void publishViews() {
propose();
}

@Override
public void vibeCheck() {
if (ViewAssembly.this.checkAssembly()) {
transitions.certified();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public interface Reconfiguration {

void publishViews();

void vibeCheck();

enum Reconfigure implements Transitions {
AWAIT_ASSEMBLY {
// Publish the Views of this node
Expand Down Expand Up @@ -96,6 +98,12 @@ public Transitions certified() {
return CERTIFICATION;
}

@Override
public Transitions checkAssembly() {
context().vibeCheck();
return null;
}

// Check to see if we already have a full complement of committee Joins
@Entry
public void chillin() {
Expand Down

0 comments on commit 0684927

Please sign in to comment.