mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 23:27:56 -05:00
chore: fmt
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user