pub(super) async fn run_state_keeper_with_multiple_l1_batches(
    pool: ConnectionPool<Core>,
    snapshot_recovery: bool,
) -> (SnapshotRecoveryStatus, Vec<Vec<H256>>) {
    let mut storage = pool.connection().await.unwrap();
    let snapshot = if snapshot_recovery {
        prepare_recovery_snapshot(&mut storage, L1BatchNumber(23), L2BlockNumber(42), &[]).await
    } else {
        ensure_genesis(&mut storage).await;
        genesis_snapshot_recovery_status()
    };
    drop(storage);

    let l1_batch = open_l1_batch(
        snapshot.l1_batch_number.0 + 1,
        snapshot.l2_block_timestamp + 1,
        snapshot.l2_block_number.0 + 1,
    );
    let first_tx = create_l2_transaction(10, 100);
    let first_tx_hash = first_tx.hash();
    let first_tx = FetchedTransaction::new(first_tx.into());
    let first_l1_batch_actions = vec![l1_batch, first_tx.into(), SyncAction::SealL2Block];

    let fictive_l2_block = SyncAction::L2Block {
        params: L2BlockParams {
            timestamp: snapshot.l2_block_timestamp + 2,
            virtual_blocks: 0,
        },
        number: snapshot.l2_block_number + 2,
    };
    let fictive_l2_block_actions = vec![fictive_l2_block, SyncAction::SealBatch];

    let l1_batch = open_l1_batch(
        snapshot.l1_batch_number.0 + 2,
        snapshot.l2_block_timestamp + 3,
        snapshot.l2_block_number.0 + 3,
    );
    let second_tx = create_l2_transaction(10, 100);
    let second_tx_hash = second_tx.hash();
    let second_tx = FetchedTransaction::new(second_tx.into());
    let second_l1_batch_actions = vec![l1_batch, second_tx.into(), SyncAction::SealL2Block];

    let (actions_sender, action_queue) = ActionQueue::new();
    let state_keeper = StateKeeperHandles::new(
        pool.clone(),
        MockMainNodeClient::default(),
        action_queue,
        &[&[first_tx_hash], &[second_tx_hash]],
    )
    .await;
    actions_sender
        .push_actions(first_l1_batch_actions)
        .await
        .unwrap();
    actions_sender
        .push_actions(fictive_l2_block_actions)
        .await
        .unwrap();
    actions_sender
        .push_actions(second_l1_batch_actions)
        .await
        .unwrap();

    let hash_task = tokio::spawn(mock_l1_batch_hash_computation(
        pool.clone(),
        snapshot.l1_batch_number.0 + 1,
    ));
    // Wait until the L2 blocks are sealed.
    state_keeper
        .wait_for_local_block(snapshot.l2_block_number + 3)
        .await;
    hash_task.await.unwrap();

    (snapshot, vec![vec![first_tx_hash], vec![second_tx_hash]])
}
Returns tx hashes of all generated transactions, grouped by the L1 batch.
core/node/node_sync/src/tests.rs