From 771f38732d417620bb044e819b42357d303da2de Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Tue, 2 Apr 2024 08:55:14 -0500 Subject: [PATCH] re-add wait for mining --- src/components/miner_toolbar/utils.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/miner_toolbar/utils.rs b/src/components/miner_toolbar/utils.rs index f1cc625c..0db84e47 100644 --- a/src/components/miner_toolbar/utils.rs +++ b/src/components/miner_toolbar/utils.rs @@ -33,11 +33,11 @@ pub async fn try_start_mining( gateway.register_ore().await?; // Wait for mining to begin if necessary - // let now_unix_timestamp = Utc::now().timestamp(); - // if START_AT.gt(&now_unix_timestamp) { - // *status_message.write() = MinerStatusMessage::Waiting; - // return Ok(()); - // } + let now_unix_timestamp = Utc::now().timestamp(); + if START_AT.gt(&now_unix_timestamp) { + *status_message.write() = MinerStatusMessage::Waiting; + return Ok(()); + } // Start mining let treasury = gateway.get_treasury().await.unwrap();