Skip to content

Commit 72c4473

Browse files
committed
addeed docs
1 parent 3c11d68 commit 72c4473

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/test/archive/archive_node_tests/common.ml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ open Async
22
open Core
33
open Mina_automation
44

5+
(** Assert that the replayer runs successfully against the latest block in the archive.
6+
7+
This function queries the archive database to find the latest state hash,
8+
then runs the replayer with the specified input configuration file against
9+
that target state hash. It verifies that the output ledger's target epoch
10+
ledgers state hash matches the latest state hash from the database.
11+
12+
@param replayer_input_file_path Path to the replayer input configuration file
13+
@param archive_uri URI connection string for the archive database
14+
@param output Output directory path where the ledger will be written
15+
@return Unit deferred that completes when assertion passes *)
516
let assert_replayer_run_against_last_block ~replayer_input_file_path archive_uri
617
output =
718
let open Deferred.Let_syntax in
@@ -31,6 +42,16 @@ let assert_replayer_run_against_last_block ~replayer_input_file_path archive_uri
3142
String.equal output_ledger.target_epoch_ledgers_state_hash latest_state_hash ) ;
3243
Deferred.unit
3344

45+
46+
47+
(** Unpack precomputed blocks from a source archive to a temporary directory.
48+
49+
This function extracts precomputed blocks from a tar archive into the specified
50+
temporary directory and filters the results to only include JSON files.
51+
52+
@param temp_dir Temporary directory path where blocks will be extracted
53+
@param source Source path of the tar archive containing precomputed blocks
54+
@return Deferred list of file paths to extracted JSON block files *)
3455
let unpack_precomputed_blocks ~temp_dir source =
3556
let open Deferred.Let_syntax in
3657
let%bind precomputed_blocks =

0 commit comments

Comments
 (0)