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

MinaProtocol / mina / 2837

30 Oct 2024 07:56AM UTC coverage: 38.267% (-22.8%) from 61.098%
2837

push

buildkite

web-flow
Merge pull request #16306 from MinaProtocol/dkijania/fix_promotion_to_gcr

Fix promotion job PUBLISH misuse

7417 of 19382 relevant lines covered (38.27%)

298565.44 hits per line

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

12.5
/src/lib/bootstrap_controller/transition_cache.ml
1
open Mina_base
1✔
2
open Core
3
open Network_peer
4

5
(* Cache represents a graph. The key is a State_hash, which is the node in
6
   the graph, and the value is the children transitions of the node *)
7

8
type t =
9
  Mina_block.initial_valid_block Envelope.Incoming.t list State_hash.Table.t
10

11
let create () = State_hash.Table.create ()
×
12

13
let add (t : t) ~parent new_child =
14
  State_hash.Table.update t parent ~f:(function
×
15
    | None ->
×
16
        [ new_child ]
17
    | Some children ->
×
18
        if
19
          List.mem children new_child ~equal:(fun e1 e2 ->
20
              let state_hash e =
×
21
                Envelope.Incoming.data e
×
22
                |> Mina_block.Validation.block_with_hash
×
23
                |> State_hash.With_state_hashes.state_hash
24
              in
25
              State_hash.equal (state_hash e1) (state_hash e2) )
×
26
        then children
×
27
        else new_child :: children )
×
28

29
let data t =
30
  let collected_transitions = State_hash.Table.data t |> List.concat in
×
31
  assert (
×
32
    Stdlib.List.compare_lengths collected_transitions
×
33
      (List.stable_dedup collected_transitions)
×
34
    = 0 )
35
  (* TODO: make this assertion more efficient *) ;
36
  collected_transitions
2✔
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