Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
configure challenge period
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Jul 10, 2023
1 parent 8b36795 commit 14ed522
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ismp-testsuite/src/mocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ impl IsmpHost for Host {
Some(Duration::from_secs(60 * 60))
}

fn store_challenge_period(&self, _consensus_state_id: ConsensusStateId, _period: u64) -> Result<(), Error> {
todo!()
}

fn unbonding_period(&self, _consensus_state_id: ConsensusStateId) -> Option<Duration> {
Some(Duration::from_secs(60 * 60 * 60))
}
Expand Down
3 changes: 3 additions & 0 deletions ismp/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ pub trait IsmpHost {
/// Should return the configured delay period for a consensus state
fn challenge_period(&self, consensus_state_id: ConsensusStateId) -> Option<Duration>;

/// Set the challenge period in seconds for a consensus state.
fn store_challenge_period(&self, consensus_state_id: ConsensusStateId, period: u64) -> Result<(), Error>;

/// Check if the client has expired since the last update
fn is_expired(&self, consensus_state_id: ConsensusStateId) -> Result<(), Error> {
let host_timestamp = self.timestamp();
Expand Down

0 comments on commit 14ed522

Please sign in to comment.