Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add expected blocktime to pallet_async_backing #30

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

girazoki
Copy link
Collaborator

Adds expected blocktime to pallet_async_backing. This is purely informative but it helps cases where this needs to be known (e.g., mocking tools like chopsticks).

Similar to Babe: https://github.com/paritytech/polkadot-sdk/blob/3c6ebd9e9bfda58f199cba6ec3023e0d12d6b506/substrate/frame/babe/src/lib.rs#L135

@girazoki girazoki changed the title add expected blocktime add expected blocktime to pallet_async_backing Mar 14, 2024
@@ -94,6 +94,9 @@ pub mod pallet {

/// A way to get the current parachain slot and verify it's validity against the relay slot.
type GetAndVerifySlot: GetAndVerifySlot;

#[pallet::constant]
type ExpectedBlockTime: Get<Self::Moment>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment that this is used by tools like chopsticks, to prevent future developers from accidentally removing it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@librelois librelois merged commit 1bb7b65 into main Mar 14, 2024
9 of 10 checks passed
@librelois librelois deleted the girazoki-add-expected-blocktime branch March 14, 2024 15:34
girazoki added a commit to moondance-labs/moonkit that referenced this pull request Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants