pallet-vesting: Configurable block number provider (#2403)

This PR makes the block number provider configurable through the Config
trait in pallet-vesting, this gives parachains the option to use the
relay chain block number provider from ParachainSystem.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Gabriel Facco de ArrudaandBastian Köcher authored and GitHub committed 2023-12-12 00:12:15 +01:00
1 parent 50b7b6f399
commit c2d45e7e47
11 files changed
+33 -9

No files matched your search

+5
View File
@@ -1919,6 +1919,11 @@ impl<T: Config> BlockNumberProvider for Pallet<T> {
fn current_block_number() -> Self::BlockNumber {
Pallet::<T>::block_number()
}
#[cfg(feature = "runtime-benchmarks")]
fn set_block_number(n: BlockNumberFor<T>) {
Self::set_block_number(n)
}
}
/// Implement StoredMap for a simple single-item, provide-when-not-default system. This works fine