From 4a9b318438caa9128bb210212c641a6de2becd06 Mon Sep 17 00:00:00 2001 From: Julien Sagot Date: Mon, 23 Sep 2024 16:09:01 +0200 Subject: [PATCH] Teztale: record reception time earlier in the code --- teztale/bin_teztale_archiver/general_archiver.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/teztale/bin_teztale_archiver/general_archiver.ml b/teztale/bin_teztale_archiver/general_archiver.ml index 63e3c7dba6d7..562919826764 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 -- GitLab