mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +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
@@ -405,6 +405,7 @@ mod tests {
|
||||
use frame_support::{
|
||||
assert_noop, assert_ok,
|
||||
dispatch::DispatchResultWithPostInfo,
|
||||
storage::generator::{StorageDoubleMap, StorageMap},
|
||||
traits::{Get, OnInitialize},
|
||||
weights::Weight,
|
||||
};
|
||||
@@ -810,4 +811,27 @@ mod tests {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn storage_keys_computed_properly() {
|
||||
assert_eq!(
|
||||
BestParaHeads::<TestRuntime>::storage_map_final_key(ParaId(42)).to_vec(),
|
||||
bp_parachains::best_parachain_head_hash_storage_key_at_target("Parachains", ParaId(42))
|
||||
.0,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
ImportedParaHeads::<TestRuntime>::storage_double_map_final_key(
|
||||
ParaId(42),
|
||||
ParaHash::from([21u8; 32])
|
||||
)
|
||||
.to_vec(),
|
||||
bp_parachains::imported_parachain_head_storage_key_at_target(
|
||||
"Parachains",
|
||||
ParaId(42),
|
||||
ParaHash::from([21u8; 32])
|
||||
)
|
||||
.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user