Removed pallet::getter usage from Beefy and MMR pallets (#3740)

Part of #3326 

cc @kianenigma @ggwpez @liamaharon 

polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp

---------

Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
This commit is contained in:
Matteo Muraca
2024-03-19 14:55:23 +01:00
committed by GitHub
parent abd3f0c49a
commit 817870e3b2
12 changed files with 81 additions and 72 deletions
+3 -3
View File
@@ -2979,7 +2979,7 @@ impl_runtime_apis! {
#[api_version(3)]
impl sp_consensus_beefy::BeefyApi<Block, BeefyId> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
Beefy::genesis_block()
pallet_beefy::GenesisBlock::<Runtime>::get()
}
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<BeefyId>> {
@@ -3018,11 +3018,11 @@ impl_runtime_apis! {
BlockNumber,
> for Runtime {
fn mmr_root() -> Result<mmr::Hash, mmr::Error> {
Ok(Mmr::mmr_root())
Ok(pallet_mmr::RootHash::<Runtime>::get())
}
fn mmr_leaf_count() -> Result<mmr::LeafIndex, mmr::Error> {
Ok(Mmr::mmr_leaves())
Ok(pallet_mmr::NumberOfLeaves::<Runtime>::get())
}
fn generate_proof(