add support for localhost brain

This commit is contained in:
ghe0 2025-04-22 18:34:38 +03:00
parent 19ffebb55d
commit fb8558f7a9
Signed by: ghe0
GPG Key ID: 451028EE56A0FBB4

@ -310,6 +310,7 @@ impl Config {
pub fn get_brain_info() -> (String, String) {
match Self::init_config().network.as_str() {
"staging" => ("https://159.65.58.38:31337".to_string(), "staging-brain".to_string()),
"localhost" => ("https://localhost:31337".to_string(), "staging-brain".to_string()),
_ => ("https://164.92.249.180:31337".to_string(), "testnet-brain".to_string()),
}
}
@ -355,7 +356,7 @@ impl Config {
}
pub fn set_network(mut network: &str) {
if network != "staging" && network != "testnet" {
if network != "staging" && network != "testnet" && network != "localhost" {
log::error!(
"The network {network} is not officially supported. Defaulting to testnet!"
);