mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 21:27:57 +00:00
Custom RPC for Merkle Mountain Range pallet (#8137)
* Add MMR custom RPC.
* Change RuntimeApi to avoid hardcoding leaf type.
* Properly implement the new RuntimeAPI and wire up RPC.
* Extract Offchain DB as separate execution extension.
* Enable offchain DB access for offchain calls.
* Fix offchain_election tests.
* Skip block initialisation for proof generation.
* Fix integration test setup.
* Fix offchain tests. Not sure how I missed them earlier 🤷.
* Fix long line.
* One more test missing.
* Update mock for multi-phase.
* Address review grumbbles.
* Address review grumbles.
* Fix line width of a comment
This commit is contained in:
@@ -26,7 +26,7 @@ use pallet_staking::testing_utils::*;
|
||||
use frame_support::{assert_ok, storage::StorageValue, traits::UnfilteredDispatchable};
|
||||
use frame_system::RawOrigin;
|
||||
use sp_runtime::DispatchError;
|
||||
use sp_core::offchain::{testing::TestOffchainExt, OffchainExt};
|
||||
use sp_core::offchain::{testing::TestOffchainExt, OffchainWorkerExt, OffchainDbExt};
|
||||
use pallet_staking::{EraElectionStatus, ElectionStatus, Module as Staking, Call as StakingCall};
|
||||
|
||||
mod mock;
|
||||
@@ -55,7 +55,8 @@ pub fn new_test_ext(iterations: u32) -> sp_io::TestExternalities {
|
||||
seed[0..4].copy_from_slice(&iterations.to_le_bytes());
|
||||
offchain_state.write().seed = seed;
|
||||
|
||||
ext.register_extension(OffchainExt::new(offchain));
|
||||
ext.register_extension(OffchainDbExt::new(offchain.clone()));
|
||||
ext.register_extension(OffchainWorkerExt::new(offchain));
|
||||
|
||||
ext
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user