Skip to content

Commit

Permalink
chore: add better alias for network current
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Dec 31, 2024
1 parent b52e291 commit 766eaf3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/src/configuration/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ impl Network {
/// The reserved wire byte for liveness ('LIVENESS_WIRE_MODE')
pub const RESERVED_WIRE_BYTE: u8 = 0xa7;

/// Alias for `get_current_or_user_setting_or_default`
pub fn get_current() -> Self {
Self::get_current_or_user_setting_or_default()
}

pub fn get_current_or_user_setting_or_default() -> Self {
match CURRENT_NETWORK.get() {
Some(&network) => network,
Expand Down

0 comments on commit 766eaf3

Please sign in to comment.