skoupidi 1 год назад
Родитель
Сommit
0d30a230fa

+ 3 - 3
bin/explorer/explorerd/src/service/sync.rs

@@ -280,9 +280,9 @@ pub async fn subscribe_sync_blocks(
     };
 
     // Evaluates whether there is a mismatch between the last confirmed block and the last synced block
-    let blocks_mismatch = (last_darkfid_height != height || last_darkfid_hash != hash)
-        && last_darkfid_height != 0
-        && height != 0;
+    let blocks_mismatch = (last_darkfid_height != height || last_darkfid_hash != hash) &&
+        last_darkfid_height != 0 &&
+        height != 0;
 
     // Check if there is a mismatch, throwing an error to prevent operating in a potentially inconsistent state
     if blocks_mismatch {

+ 2 - 2
bin/explorer/explorerd/src/store/metrics.rs

@@ -1244,8 +1244,8 @@ mod tests {
 
         // Iterate and load data
         for height in 0..HEIGHT {
-            let timestamp_secs = (UNIX_EPOCH
-                + Duration::from_secs(start_time + height as u64 * GAS_METRICS_KEY_TIME_INTERVAL))
+            let timestamp_secs = (UNIX_EPOCH +
+                Duration::from_secs(start_time + height as u64 * GAS_METRICS_KEY_TIME_INTERVAL))
             .duration_since(UNIX_EPOCH)?
             .as_secs();