-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Migrate node authorization pallet to FRAME v2 #8337
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.
let sender = ensure_signed(origin)?; | ||
|
||
ensure!(node.0.len() < T::MaxPeerIdLength::get() as usize, Error::<T>::PeerIdTooLong); | ||
ensure!(Owners::<T>::contains_key(&node), Error::<T>::NotClaimed); | ||
ensure!(Owners::<T>::get(&node) == sender, Error::<T>::NotOwner); | ||
let pre_owner = Owners::<T>::get(&node).ok_or(Error::<T>::NotClaimed)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have prefered to have a PR which only does the migration without any other changes, it would make it easier to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can you confirm the metadata pre and post migration is the same?
@ascjones Here is the diff: https://www.diffchecker.com/spxo73UK |
Related to #7882 #8293