mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Parachain loop metrics (#1484)
* parachain loop metrics * some fixes * mini refactoring * add tests
This commit is contained in:
committed by
Bastian Köcher
parent
f8ff3c9142
commit
d11d9fd0b7
@@ -56,7 +56,7 @@ pub fn parachain_head_storage_key_at_source(
|
||||
/// Returns runtime storage key of best known parachain head at the target chain.
|
||||
///
|
||||
/// The head is stored by the `pallet-bridge-parachains` pallet in the `BestParaHeads` map.
|
||||
pub fn parachain_head_storage_key_at_target(
|
||||
pub fn best_parachain_head_hash_storage_key_at_target(
|
||||
bridge_parachains_pallet_name: &str,
|
||||
para_id: ParaId,
|
||||
) -> StorageKey {
|
||||
@@ -66,3 +66,19 @@ pub fn parachain_head_storage_key_at_target(
|
||||
¶_id.encode(),
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns runtime storage key of the parachain head with given hash at the target chain.
|
||||
///
|
||||
/// The head is stored by the `pallet-bridge-parachains` pallet in the `ImportedParaHeads` map.
|
||||
pub fn imported_parachain_head_storage_key_at_target(
|
||||
bridge_parachains_pallet_name: &str,
|
||||
para_id: ParaId,
|
||||
head_hash: ParaHash,
|
||||
) -> StorageKey {
|
||||
bp_runtime::storage_double_map_final_key::<Blake2_128Concat, Blake2_128Concat>(
|
||||
bridge_parachains_pallet_name,
|
||||
"ImportedParaHeads",
|
||||
¶_id.encode(),
|
||||
&head_hash.encode(),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user