Skip to content

Commit f7cc801

Browse files
committed
include trusting_period and max_clock_drift in mock light client config
1 parent 6b47dc7 commit f7cc801

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/ibc/src/mock/context.rs

+7
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,11 @@ pub struct MockClientConfig {
342342
consensus_state_heights: Vec<Height>,
343343
#[builder(default = Timestamp::now())]
344344
latest_timestamp: Timestamp,
345+
346+
#[builder(default = Duration::from_secs(64000))]
347+
pub trusting_period: Duration,
348+
#[builder(default = Duration::from_millis(3000))]
349+
max_clock_drift: Duration,
345350
}
346351

347352
/// Returns a MockContext with bare minimum initialization: no clients, no connections and no channels are
@@ -723,6 +728,8 @@ impl MockContext {
723728
let client_state: TmClientState = TmClientStateConfig::builder()
724729
.chain_id(client.client_chain_id)
725730
.latest_height(client.client_state_height)
731+
.trusting_period(client.trusting_period)
732+
.max_clock_drift(client.max_clock_drift)
726733
.build()
727734
.try_into()
728735
.expect("never fails");

0 commit comments

Comments
 (0)