Skip to content

Commit 0d2d642

Browse files
committed
revert advance chain height with timestamp
1 parent f7cc801 commit 0d2d642

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

crates/ibc/src/mock/context.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -887,17 +887,15 @@ impl MockContext {
887887

888888
/// Triggers the advancing of the host chain, by extending the history of blocks (or headers).
889889
pub fn advance_host_chain_height(&mut self) {
890-
self.advance_host_chain_height_with_timestamp(self.host_timestamp().expect("Never fails"))
891-
}
892-
893-
/// Triggers the advancing of the host chain, by extending the history of blocks (or headers).
894-
pub fn advance_host_chain_height_with_timestamp(&mut self, timestamp: Timestamp) {
895890
let latest_block = self.history.last().expect("history cannot be empty");
896891
let new_block = HostBlock::generate_block(
897892
self.host_chain_id.clone(),
898893
self.host_chain_type,
899894
latest_block.height().increment().revision_height(),
900-
timestamp,
895+
latest_block
896+
.timestamp()
897+
.add(self.block_time)
898+
.expect("Never fails"),
901899
);
902900

903901
// Append the new header at the tip of the history.

0 commit comments

Comments
 (0)