Skip to content

Commit

Permalink
Update worker.rs
Browse files Browse the repository at this point in the history
Make clippy happy
  • Loading branch information
Nexus2k authored Nov 29, 2023
1 parent fd7d772 commit 8703a80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions standalone/prb/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,13 @@ impl WorkerContext {
let stake_onchain: Option<u128> = fetch_storage_bytes(&api, &stake_query).await?;
if stake_onchain.is_some() {
info!("Stake: {:?}, {:?} on-chain", &worker.stake.parse::<u128>().unwrap(), &stake_onchain.unwrap());
if &stake_onchain.unwrap() < &worker.stake.parse::<u128>().unwrap() {
if stake_onchain.unwrap() < worker.stake.parse::<u128>().unwrap() {
set_worker_message!(c, "Adjusting on-chain stake...");
txm.clone()
.restart_computing(pid, pubkey, worker.stake)
.await?;
Self::set_state(c.clone(), WorkerLifecycleState::Working).await;
} else if &stake_onchain.unwrap() > &worker.stake.parse::<u128>().unwrap() {
} else if stake_onchain.unwrap() > worker.stake.parse::<u128>().unwrap() {
set_worker_message!(c, "Error on-chain stake higher, than configured...");
}
}
Expand Down

0 comments on commit 8703a80

Please sign in to comment.