diff --git a/Rocket.toml b/Rocket.toml index 97e9661..6077f33 100644 --- a/Rocket.toml +++ b/Rocket.toml @@ -2,3 +2,7 @@ address = "127.0.0.1" log_level = "critical" +# Uncomment and change default port number (8000) if another instance of the explorer is needed to run. +# E.g. Mainnet (8000) and Testnet (8001) instances. +# port = 8000 + diff --git a/src/main.rs b/src/main.rs index fa93a9d..c7227db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -155,7 +155,7 @@ fn search(input: &str) -> Either { } else if input.len() == 64 { return Either::Right(Redirect::to(uri!(block_header_by_hash(input)))); - // Kernel hash + // Kernel } else if input.len() == 66 { return Either::Right(Redirect::to(uri!(kernel(input)))); } diff --git a/src/requests.rs b/src/requests.rs index d3ac911..f1b4839 100644 --- a/src/requests.rs +++ b/src/requests.rs @@ -93,6 +93,9 @@ pub async fn get_status(dashboard: Arc>) -> Result<(), Error> { data.proto_ver = resp["result"]["Ok"]["protocol_version"].to_string(); } + // Also set cg_api value + data.cg_api = CONFIG.coingecko_api.clone(); + Ok(()) } @@ -153,9 +156,6 @@ pub async fn get_market(dashboard: Arc>) -> Result<(), Error> { let mut data = dashboard.lock().unwrap(); - // Save the setting into Dashboard structure for later use - data.cg_api = CONFIG.coingecko_api.clone(); - if data.height.is_empty() == false { // Calculating coin supply // Adding +1 as block index starts with 0 diff --git a/templates/error.html.tera b/templates/error.html.tera index 15c7ec0..88b82f8 100644 --- a/templates/error.html.tera +++ b/templates/error.html.tera @@ -7,11 +7,7 @@

No results found.


- Explorer supports requests by block number, block hash or kernel.

- Examples:
- Block number - 2765726
- Block hash - 0000fc4d93e5717579b955ab840165d96603f009804a228be22da76f6f906a3c
- Kernel - 084caeb931b7e8cb73d6419ea74ea157a3cef19f6e9307108a8a808df58437a4ef + Explorer supports requests by block number, block hash or kernel.