-
Notifications
You must be signed in to change notification settings - Fork 710
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
Update pallet nomination pool to support Block Number Provider #6715
base: master
Are you sure you want to change the base?
Update pallet nomination pool to support Block Number Provider #6715
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me,
@@ -3092,9 +3098,11 @@ pub mod pallet { | |||
} | |||
|
|||
#[pallet::hooks] | |||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { | |||
impl<T: Config> Hooks<frame_system::pallet_prelude::BlockNumberFor<T>> for Pallet<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally I would have introduced a different type alias to avoid the name collision with the frame_system::pallet_prelude::BlockNumberFor
.
But I don't mind any implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have done as suggested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking the opposite like keeping BlockNumberFor
for the system one, and having maybe ProvidedBlockNumberFor
or PalletBlockNumberFor
.
But this is also good to me.
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
This PR makes the nomination pool pallet use the relay chain as a block provider for a parachain on a regular schedule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't force the nomination pool pallet to use the relay chain block provider,
This PR makes the nomination pool pallet use the relay chain as a block provider for a parachain on a regular schedule. | |
This PR makes the block number provider used in the nomination pool pallet configurable. Before this PR, nomination pool pallet always used the system block number, with this PR some runtime can opt to use the relay chain block number instead. |
This PR introduces BlockNumberProvider config for the nomination pool pallet.
closes part of #6297