mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Check that validator set is not empty at genesis (#3083)
* Check that the returned validator set is not empty * Move assert to session module * Clean up
This commit is contained in:
committed by
Gavin Wood
parent
df93867620
commit
0366f7b35c
@@ -599,7 +599,10 @@ decl_storage! {
|
||||
| {
|
||||
with_storage(storage, || {
|
||||
for &(ref stash, ref controller, balance, ref status) in &config.stakers {
|
||||
assert!(T::Currency::free_balance(&stash) >= balance);
|
||||
assert!(
|
||||
T::Currency::free_balance(&stash) >= balance,
|
||||
"Stash does not have enough balance to bond."
|
||||
);
|
||||
let _ = <Module<T>>::bond(
|
||||
T::Origin::from(Some(stash.clone()).into()),
|
||||
T::Lookup::unlookup(controller.clone()),
|
||||
|
||||
Reference in New Issue
Block a user