Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfirefist committed Apr 30, 2024
1 parent 7dd1def commit ddb8e09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions apps/fortuna/src/command/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ pub async fn run(opts: &RunOptions) -> Result<()> {
.provider_config
.as_ref()
.map(|path| ProviderConfig::load(&path).expect("Failed to load provider config"));
let private_key = opts.load_private_key()?;
let secret = opts.randomness.load_secret()?;
let (tx_exit, rx_exit) = watch::channel(false);

Expand Down Expand Up @@ -212,8 +211,8 @@ pub async fn run(opts: &RunOptions) -> Result<()> {
Ok::<(), Error>(())
});

if let Some(private_key) = private_key {
spawn(run_keeper(chains.clone(), config, private_key));
if let Some(keeper_private_key) = opts.load_keeper_private_key()? {
spawn(run_keeper(chains.clone(), config, keeper_private_key));
}

run_api(opts.addr.clone(), chains, rx_exit).await?;
Expand Down
2 changes: 1 addition & 1 deletion apps/fortuna/src/config/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub struct RunOptions {
}

impl RunOptions {
pub fn load_private_key(&self) -> Result<Option<String>> {
pub fn load_keeper_private_key(&self) -> Result<Option<String>> {
if let Some(ref keeper_private_key_file) = self.keeper_private_key_file {
return Ok(Some(fs::read_to_string(keeper_private_key_file)?));
}
Expand Down

0 comments on commit ddb8e09

Please sign in to comment.