mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 14:31:02 +00:00
Removed pallet::getter usage from Polkadot Runtime pallets (#3660)
Part of #3326 @kianenigma @ggwpez polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp --------- Signed-off-by: Matteo Muraca <mmuraca247@gmail.com> Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
@@ -354,9 +354,11 @@ parameter_types! {
|
||||
pub struct ParaHeadsRootProvider;
|
||||
impl BeefyDataProvider<H256> for ParaHeadsRootProvider {
|
||||
fn extra_data() -> H256 {
|
||||
let mut para_heads: Vec<(u32, Vec<u8>)> = Paras::parachains()
|
||||
let mut para_heads: Vec<(u32, Vec<u8>)> = parachains_paras::Parachains::<Runtime>::get()
|
||||
.into_iter()
|
||||
.filter_map(|id| Paras::para_head(&id).map(|head| (id.into(), head.0)))
|
||||
.filter_map(|id| {
|
||||
parachains_paras::Heads::<Runtime>::get(&id).map(|head| (id.into(), head.0))
|
||||
})
|
||||
.collect();
|
||||
para_heads.sort_by_key(|k| k.0);
|
||||
binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
||||
@@ -1615,7 +1617,7 @@ pub mod migrations {
|
||||
impl coretime::migration::GetLegacyLease<BlockNumber> for GetLegacyLeaseImpl {
|
||||
fn get_parachain_lease_in_blocks(para: ParaId) -> Option<BlockNumber> {
|
||||
let now = frame_system::Pallet::<Runtime>::block_number();
|
||||
let lease = slots::Pallet::<Runtime>::lease(para);
|
||||
let lease = slots::Leases::<Runtime>::get(para);
|
||||
if lease.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user