Skip to content
Snippets Groups Projects
Commit c7277995 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Better description for assert in frame-session genesis (#8399)


* Better description for assert in frame-session genesis

There is an assert that checks that an account exists, after setting a
key. However, this assert isn't very self-descriptive.

* Update frame/session/src/lib.rs

Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>

Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
parent 33fefc25
No related merge requests found
......@@ -442,7 +442,11 @@ decl_storage! {
for (account, val, keys) in config.keys.iter().cloned() {
<Module<T>>::inner_set_keys(&val, keys)
.expect("genesis config must not contain duplicates; qed");
assert!(frame_system::Pallet::<T>::inc_consumers(&account).is_ok());
assert!(
frame_system::Pallet::<T>::inc_consumers(&account).is_ok(),
"Account ({:?}) does not exist at genesis to set key. Account not endowed?",
account,
);
}
let initial_validators_0 = T::SessionManager::new_session(0)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment