Skip to content

Commit

Permalink
Adjust IBC timeout values
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 committed Jun 14, 2024
1 parent db67411 commit 17adaeb
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions crates/ibc/src/context/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,22 @@ where
.get_block_height()
.expect("The height should exist");

namada_parameters::estimate_max_block_time_from_blocks_and_params(
&*self.inner.borrow(),
height,
5, // estimate max height with up to 5 blocks in the past
)
.expect("Failed to estimate max block time")
.into()
let estimate =
namada_parameters::estimate_max_block_time_from_blocks_and_params(
&*self.inner.borrow(),
height,
// NB: estimate max height with up to 5 blocks in the past,
// which will not result in too many reads
5,
)
.expect("Failed to estimate max block time");

// NB: pick a lower max blocktime estimate during tests,
// to avoid flakes in CI
#[cfg(any(test, feature = "testing"))]
let estimate = estimate.min(namada_core::time::DurationSecs(5));

estimate.into()
}

fn validate_message_signer(
Expand Down

0 comments on commit 17adaeb

Please sign in to comment.