-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refac: remove string utils #20
Conversation
// If the subnet doesn't exist, registration will create it. | ||
Self::add_subnet_from_registration(network.clone(), stake_amount, &key)?; | ||
} | ||
let netuid = if let Some(netuid) = Self::get_netuid_for_name(&network) { |
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.
.unwrap_or_else?
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.
The runtime upgrade ran successfully
pallets/subspace/src/voting.rs
Outdated
@@ -182,16 +186,13 @@ impl<T: Config> Pallet<T> { | |||
let mode = proposal.mode.clone(); | |||
|
|||
// check if proposal is valid | |||
if is_vec_str(mode.clone(), "global") { | |||
if mode == GLOBAL_MODE { |
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.
Isn't it possible to use pattern matching over mode
?
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.
yep, ill refactor it and merge afterwards
93a6f78
to
54f318c
Compare
Co-authored-by: My Name <[email protected]>
No description provided.