add support for localhost brain
This commit is contained in:
parent
19ffebb55d
commit
fb8558f7a9
@ -310,6 +310,7 @@ impl Config {
|
|||||||
pub fn get_brain_info() -> (String, String) {
|
pub fn get_brain_info() -> (String, String) {
|
||||||
match Self::init_config().network.as_str() {
|
match Self::init_config().network.as_str() {
|
||||||
"staging" => ("https://159.65.58.38:31337".to_string(), "staging-brain".to_string()),
|
"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()),
|
_ => ("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) {
|
pub fn set_network(mut network: &str) {
|
||||||
if network != "staging" && network != "testnet" {
|
if network != "staging" && network != "testnet" && network != "localhost" {
|
||||||
log::error!(
|
log::error!(
|
||||||
"The network {network} is not officially supported. Defaulting to testnet!"
|
"The network {network} is not officially supported. Defaulting to testnet!"
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user