diff --git a/teztale/bin_teztale_archiver/general_archiver.ml b/teztale/bin_teztale_archiver/general_archiver.ml index 63e3c7dba6d77adb532ff0146a95e6dec3fbfec3..562919826764a0cad72af14a9318f2cbf717e9f2 100644 --- a/teztale/bin_teztale_archiver/general_archiver.ml +++ b/teztale/bin_teztale_archiver/general_archiver.ml @@ -344,6 +344,7 @@ module Loops (Archiver : Archiver.S) = struct let*! _ = Lwt_stream.fold_s (fun (_chain_id, hash, header, _operations) acc -> + let now = Time.System.now () in let*! block_recorder, acc' = match acc with | Some (f, proto_level) @@ -447,7 +448,7 @@ module Loops (Archiver : Archiver.S) = struct let reception = { Data.Block.source = "archiver"; - application_time = Some (Time.System.now ()); + application_time = Some now; validation_time = None; } in @@ -474,6 +475,7 @@ module Loops (Archiver : Archiver.S) = struct let*! _ = Lwt_stream.fold_s (fun (_chain_id, hash, header, _operations) acc -> + let now = Time.System.now () in let*! block_recorder, acc' = match acc with | Some (f, proto_level) @@ -532,7 +534,7 @@ module Loops (Archiver : Archiver.S) = struct { Data.Block.source = "archiver"; application_time = None; - validation_time = Some (Time.System.now ()); + validation_time = Some now; } in let block_level = header.Block_header.shell.Block_header.level in