Avoid duplicate function definitions

Avoid duplicate function definitions for:
- ensure_owner_or_root()
- ensure_not_halted()
- set_owner()
- set_operating_mode() / set_operational()

Signed-off-by: Serban Iorga <serban@parity.io>
This commit is contained in:
Serban Iorga
2022-06-24 21:23:01 +03:00
committed by Bastian Köcher
parent a97dedb50f
commit ff342fafa9
5 changed files with 150 additions and 124 deletions
@@ -97,12 +97,15 @@ impl<AccountId> TaggedAccount<AccountId> {
pub fn tag(&self) -> String {
match *self {
TaggedAccount::Headers { ref bridged_chain, .. } => format!("{}Headers", bridged_chain),
TaggedAccount::Parachains { ref bridged_chain, .. } =>
format!("{}Parachains", bridged_chain),
TaggedAccount::Messages { ref bridged_chain, .. } =>
format!("{}Messages", bridged_chain),
TaggedAccount::MessagesPalletOwner { ref bridged_chain, .. } =>
format!("{}MessagesPalletOwner", bridged_chain),
TaggedAccount::Parachains { ref bridged_chain, .. } => {
format!("{}Parachains", bridged_chain)
},
TaggedAccount::Messages { ref bridged_chain, .. } => {
format!("{}Messages", bridged_chain)
},
TaggedAccount::MessagesPalletOwner { ref bridged_chain, .. } => {
format!("{}MessagesPalletOwner", bridged_chain)
},
}
}
}