Skip to content

Commit 3cbb542

Browse files
committed
fix: use relay-parent-offset in mocked timestamp
1 parent 83c255b commit 3cbb542

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎bin/collator/src/local/service.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ fn build_local_mock_inherent_data(
277277
..Default::default()
278278
};
279279

280-
let timestamp = relay_slot.saturating_mul(RELAY_CHAIN_SLOT_DURATION_MILLIS);
280+
let timestamp = relay_slot
281+
.saturating_add(u64::from(relay_parent_offset))
282+
.saturating_mul(RELAY_CHAIN_SLOT_DURATION_MILLIS);
281283
let timestamp_provider = sp_timestamp::InherentDataProvider::new(timestamp.into());
282284

283285
(timestamp_provider, mocked_parachain)

0 commit comments

Comments
 (0)