Skip to content

Commit

Permalink
Closes #18 - Public key validation added befor update procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
35359595 committed Dec 21, 2021
1 parent d71f51f commit a3ff7ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pallets/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ pub mod pallet {
let key = pallet_thea::Pallet::<T>::public_keys(
<ValidatorSetId<T>>::get().saturating_add(1),
);
handle_thea_key_update_for_ethereum::<T>(to, key.as_ref(), n);
// check if key for next validator set was properly set
if key != sp_core::ecdsa::Public::default() {
handle_thea_key_update_for_ethereum::<T>(to, key.as_ref(), n);
}
// TODO: Use something like this T::WeightInfo::on_initialize(num_of_withdrawls)
return Weight::from(20000u64)
}
Expand Down

0 comments on commit a3ff7ee

Please sign in to comment.