mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Companion for: pallet-mmr: move offchain logic to client-side gadget (#6321)
* Spawn MMR gadget when offchain indexing is enabled
* companion PR code review changes: 1st iteration
* Code review changes: 2nd iteration
* update lockfile for {"substrate"}
Co-authored-by: acatangiu <adrian@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -1224,7 +1224,7 @@ impl pallet_beefy::Config for Runtime {
|
||||
type MmrHash = <Keccak256 as sp_runtime::traits::Hash>::Output;
|
||||
|
||||
impl pallet_mmr::Config for Runtime {
|
||||
const INDEXING_PREFIX: &'static [u8] = b"mmr";
|
||||
const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX;
|
||||
type Hashing = Keccak256;
|
||||
type Hash = MmrHash;
|
||||
type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest<Runtime>;
|
||||
@@ -1715,6 +1715,10 @@ sp_api::impl_runtime_apis! {
|
||||
Ok(Mmr::mmr_root())
|
||||
}
|
||||
|
||||
fn mmr_leaf_count() -> Result<mmr::LeafIndex, mmr::Error> {
|
||||
Ok(Mmr::mmr_leaves())
|
||||
}
|
||||
|
||||
fn generate_proof(
|
||||
block_numbers: Vec<BlockNumber>,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
|
||||
Reference in New Issue
Block a user