Skip to content

Commit

Permalink
WIP: Implement can_send_validator_set_update
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 committed Aug 10, 2022
1 parent 51e1869 commit eb1f7d7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions apps/src/lib/node/ledger/shell/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,15 @@ where
})
}

// TODO: we might need to add some param here to perform
// the same check when we receive a validator set update
// vote extension
fn can_send_validator_set_update(&self) -> bool {
// let current_height = self.last_height.0 + 1;
// let new_epoch_height = self.next_epoch_min_start_height.0;
// new_epoch_height.wrapping_sub(current_height) == 1
todo!()
self.last_height.0 == 0 || {
// let current_height = self.last_height.0 + 1;
// let new_epoch_height = self.next_epoch_min_start_height.0;
// new_epoch_height.wrapping_sub(current_height) == 1
todo!()
}
}
}

0 comments on commit eb1f7d7

Please sign in to comment.