Skip to content
Snippets Groups Projects
Commit b1b61a74 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

test: OK for double maps

parent 3de87251
No related branches found
No related tags found
No related merge requests found
......@@ -314,7 +314,13 @@ impl StorageIterativeChecker {
Key::_ManualKey("Proxy".to_string(), "Announcements".to_string(), "[
]".to_string()),
Key::_ManualKey("Treasury".to_string(), "Proposals".to_string(), "[
]".to_string())
]".to_string()),
Key::_ManualKey("Offences".to_string(), "ConcurrentReportsIndex".to_string(), "[
]".to_string()),
Key::_ManualKey("Multisig".to_string(), "Multisigs".to_string(), "[
]".to_string()),
Key::_ManualKey("AtomicSwap".to_string(), "PendingSwaps".to_string(), "[
]".to_string()),
]
},
overriden: HashMap::new(),
......
......@@ -688,9 +688,9 @@ impl Key {
Key::OffencesReports => {
Some(|| to_kv(pallet_offences::Reports::<Runtime>::iter().collect()))
}
// TODO: double map
// Key::OffencesConcurrentReportsIndex => Some(|| to_kv(pallet_offences::ConcurrentReportsIndex::<Runtime>::iter().collect())),
Key::OffencesConcurrentReportsIndex => None,
Key::OffencesConcurrentReportsIndex => Some(|| to_kv(pallet_offences::ConcurrentReportsIndex::<Runtime>::iter()
.map(to_simple_map)
.collect())),
Key::SessionNextKeys => {
Some(|| to_kv(pallet_session::NextKeys::<Runtime>::iter().collect()))
}
......@@ -778,11 +778,10 @@ impl Key {
.collect(),
)
}),
// TODO: double map
// Key::AtomicSwapPendingSwaps => Some(|| to_kv(pallet_atomic_swap::PendingSwaps::<Runtime>::iter().collect())),
Key::AtomicSwapPendingSwaps => None,
// TODO: double map
// Key::MultisigMultisigs => Some(|| to_kv(pallet_multisig::Multisigs::<Runtime>::iter().collect())),
Key::AtomicSwapPendingSwaps => Some(|| to_kv(pallet_atomic_swap::PendingSwaps::<Runtime>::iter()
.map(to_simple_map).collect())),
Key::MultisigMultisigs => Some(|| to_kv(pallet_multisig::Multisigs::<Runtime>::iter()
.map(to_simple_map).collect())),
Key::MultisigMultisigs => None,
Key::ProvideRandomnessRequestsReadyAtEpoch => Some(|| {
to_kv(pallet_provide_randomness::RequestsReadyAtEpoch::<Runtime>::iter().collect())
......@@ -964,6 +963,15 @@ impl Key {
// Some(Box::new(move || t))
// }
fn to_simple_map<K1, K2, V>((k1, k2, v): (K1, K2, V)) -> (String, V)
where
K1: Debug + 'static,
K2: Debug + 'static,
V: Debug + 'static,
{
(format!("{:?} => {:?}", k1, k2), v)
}
fn to_kv<K: Debug + 'static, V: Debug + 'static>(
hm: HashMap<K, V>,
) -> BTreeMap<Box<String>, Box<dyn Debug>> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment