Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion for: pallet-mmr: move offchain logic to client-side gadget #6321

Merged
merged 7 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
companion PR code review changes: 1st iteration
  • Loading branch information
serban300 committed Nov 23, 2022
commit f36f1f83610da5d574dfe48b5a2d2b3a45bc587b
2 changes: 1 addition & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ sp_api::impl_runtime_apis! {
Err(mmr::Error::PalletNotIncluded)
}

fn num_mmr_blocks() -> Result<BlockNumber, mmr::Error> {
fn mmr_leaves_count() -> Result<mmr::LeafIndex, mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,7 @@ sp_api::impl_runtime_apis! {
Err(mmr::Error::PalletNotIncluded)
}

fn num_mmr_blocks() -> Result<BlockNumber, mmr::Error> {
fn mmr_leaves_count() -> Result<mmr::LeafIndex, mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

Expand Down
4 changes: 2 additions & 2 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1723,8 +1723,8 @@ sp_api::impl_runtime_apis! {
Ok(Mmr::mmr_root())
}

fn num_mmr_blocks() -> Result<BlockNumber, mmr::Error> {
Mmr::num_mmr_blocks()
fn mmr_leaves_count() -> Result<mmr::LeafIndex, mmr::Error> {
Ok(Mmr::mmr_leaves())
}

fn generate_proof(
Expand Down
2 changes: 1 addition & 1 deletion runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ sp_api::impl_runtime_apis! {
Err(mmr::Error::PalletNotIncluded)
}

fn num_mmr_blocks() -> Result<BlockNumber, mmr::Error> {
fn mmr_leaves_count() -> Result<mmr::LeafIndex, mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ sp_api::impl_runtime_apis! {
Err(mmr::Error::PalletNotIncluded)
}

fn num_mmr_blocks() -> Result<BlockNumber, mmr::Error> {
fn mmr_leaves_count() -> Result<mmr::LeafIndex, mmr::Error> {
Err(mmr::Error::PalletNotIncluded)
}

Expand Down