Ban Serai from setting keys

They were already banned form publishing `Batch`s, yet the ability to set keys
enabled changing how certain functionality in the coordinator operated.
Removing this malleability ensures operation as expected.
This commit is contained in:
Luke Parker 2023-11-18 21:27:06 -05:00
parent b018fc432c
commit 25c02c1311
No known key found for this signature in database

View file

@ -741,6 +741,11 @@ pub mod pallet {
Call::__Ignore(_, _) => unreachable!(),
};
// Don't allow the Serai set to set_keys, as they have no reason to do so
if network == &NetworkId::Serai {
Err(InvalidTransaction::Custom(0))?;
}
let session = Session(pallet_session::Pallet::<T>::current_index());
let set = ValidatorSet { session, network: *network };