• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MinaProtocol / mina / 767

04 Nov 2025 01:59PM UTC coverage: 32.374% (-4.5%) from 36.902%
767

push

buildkite

web-flow
Merge pull request #18063 from MinaProtocol/lyh/compat-into-dev-nov4-2025

Merge compatible into develop Nov. 4th 2025

87 of 228 new or added lines in 10 files covered. (38.16%)

3416 existing lines in 136 files now uncovered.

23591 of 72871 relevant lines covered (32.37%)

26590.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.45
/src/lib/network_pool/locally_generated.ml
1
open Core_kernel
122✔
2
open Mina_base
3
open Mina_transaction
4

5
type key = Transaction_hash.User_command_with_valid_signature.t
6

7
type value = Time.t * [ `Batch of int ]
8

9
type t =
10
  (Time.t * [ `Batch of int ] * User_command.Valid.t) Transaction_hash.Map.t ref
11

12
let find_and_remove (t : t) cmd =
13
  let hash =
×
14
    Transaction_hash.User_command_with_valid_signature.transaction_hash cmd
15
  in
16
  let%map.Option time, batch, _ = Transaction_hash.Map.find !t hash in
×
17
  t := Transaction_hash.Map.remove !t hash ;
×
18
  (time, batch)
19

20
let add_exn (t : t) ~key:cmd ~data:(time, batch) =
21
  let hash =
×
22
    Transaction_hash.User_command_with_valid_signature.transaction_hash cmd
23
  in
24
  let cmd_ = Transaction_hash.User_command_with_valid_signature.data cmd in
×
25
  t := Transaction_hash.Map.add_exn !t ~key:hash ~data:(time, batch, cmd_)
×
26

27
let mem (t : t) cmd =
28
  let hash =
×
29
    Transaction_hash.User_command_with_valid_signature.transaction_hash cmd
30
  in
31
  Transaction_hash.Map.mem !t hash
×
32

UNCOV
33
let create () = ref Transaction_hash.Map.empty
×
34

35
let update (t : t) cmd
36
    ~(f : (Time.t * [ `Batch of int ]) option -> Time.t * [ `Batch of int ]) =
37
  let hash =
×
38
    Transaction_hash.User_command_with_valid_signature.transaction_hash cmd
39
  in
40
  let cmd_ = Transaction_hash.User_command_with_valid_signature.data cmd in
×
41
  t :=
×
42
    Transaction_hash.Map.update !t hash ~f:(fun found ->
×
43
        let found' = Option.map ~f:(fun (t, b, _) -> (t, b)) found in
×
44
        let t', b' = f found' in
×
45
        (t', b', cmd_) )
×
46

47
let filteri_inplace (t : t) ~f =
UNCOV
48
  t :=
×
UNCOV
49
    Transaction_hash.Map.filteri !t ~f:(fun ~key ~data:(time, batch, cmd) ->
×
50
        f
×
51
          ~key:(Transaction_hash.User_command_with_valid_signature.make cmd key)
×
52
          ~data:(time, batch) )
53

54
let to_alist (t : t) =
UNCOV
55
  Transaction_hash.Map.to_alist !t
×
56
  |> List.map ~f:(fun (hash, (time, batch, cmd)) ->
57
         ( Transaction_hash.User_command_with_valid_signature.make cmd hash
×
58
         , (time, batch) ) )
59

60
let iter_intersection (a : t) (b : t) ~f =
61
  Transaction_hash.Map.iteri !a ~f:(fun ~key ~data:(time1, batch1, cmd) ->
×
62
      Transaction_hash.Map.find !b key
×
63
      |> Option.iter ~f:(fun (time2, batch2, _) ->
64
             f
×
65
               ~key:
66
                 (Transaction_hash.User_command_with_valid_signature.make cmd
×
67
                    key )
68
               (time1, batch1) (time2, batch2) ) )
69

70
let iteri (t : t) ~f =
71
  Transaction_hash.Map.iteri !t ~f:(fun ~key ~data:(time, batch, cmd) ->
×
72
      f
×
73
        ~key:(Transaction_hash.User_command_with_valid_signature.make cmd key)
×
74
        ~data:(time, batch) )
122✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc