removed pallet::getter usage from cumulus pallets (#3471)

Part of #3326 

@ggwpez @kianenigma @shawntabrizi

polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp

---------

Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
This commit is contained in:
Matteo Muraca
2024-03-18 20:19:20 +01:00
committed by GitHub
parent 0c6c837f68
commit 610987a19d
9 changed files with 292 additions and 266 deletions
@@ -54,8 +54,8 @@ where
let velocity = V.max(1);
let relay_chain_slot = state_proof.read_slot().expect("failed to read relay chain slot");
let (slot, authored) = pallet::Pallet::<T>::slot_info()
.expect("slot info is inserted on block initialization");
let (slot, authored) =
pallet::SlotInfo::<T>::get().expect("slot info is inserted on block initialization");
// Convert relay chain timestamp.
let relay_chain_timestamp =
@@ -100,7 +100,7 @@ impl<
/// is more recent than the included block itself.
pub fn can_build_upon(included_hash: T::Hash, new_slot: Slot) -> bool {
let velocity = V.max(1);
let (last_slot, authored_so_far) = match pallet::Pallet::<T>::slot_info() {
let (last_slot, authored_so_far) = match pallet::SlotInfo::<T>::get() {
None => return true,
Some(x) => x,
};