Skip to content

Commit

Permalink
fix missing resolver config folder issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Jul 22, 2024
1 parent 3e20d83 commit d909e37
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "khost"
version = "0.0.1"
version = "0.0.2"
edition = "2021"
authors = ["Kaspa developers"]
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ fn load_key() -> Result<Secret> {
}

pub fn update_resolver_config_version(version: usize, key: &Secret) -> Result<()> {
ensure_resolver_config_folder()?;

let data = reqwest::blocking::get(format!(
"https://raw.githubusercontent.com/aspectron/kaspa-resolver/master/data/{}",
resolver_config_file(version)
Expand Down Expand Up @@ -427,6 +429,8 @@ pub fn check_resolver_key(ctx: &mut Context) -> Result<()> {
}

pub fn init_resolver_config(ctx: &mut Context) -> Result<()> {
ensure_resolver_config_folder()?;

if !ctx.config.resolver.enabled {
log::warning("Resolver service is not enabled, please enable it.")?;
return Ok(());
Expand Down

0 comments on commit d909e37

Please sign in to comment.