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

MinaProtocol / mina / 2995

25 Nov 2024 08:02PM UTC coverage: 32.818% (-27.9%) from 60.697%
2995

push

buildkite

web-flow
Merge pull request #16378 from MinaProtocol/dkijania/implement_test_ledger_apply_dev

implement test ledger apply dev

23246 of 70834 relevant lines covered (32.82%)

17178.91 hits per line

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

33.33
/src/lib/transition_handler/unprocessed_transition_cache.ml
1
(* The unprocessed transition cache is a cache of transitions which have been
2
 * ingested from the network but have not yet been processed into the transition
3
 * frontier. This is used in order to drop duplicate transitions which are still
4
 * being handled by various threads in the transition frontier controller. *)
5

4✔
6
open Core_kernel
7
open Mina_base
8
open Network_peer
9

10
module Name = struct
11
  let t = __MODULE__
12
end
13

14
module Transmuter = struct
15
  module Source = struct
16
    type t = Mina_block.initial_valid_block Envelope.Incoming.t
17
  end
18

19
  module Target = struct
20
    include State_hash
21

22
    let to_string = to_base58_check
23
  end
24

25
  let transmute enveloped_transition =
26
    let transition, _ = Envelope.Incoming.data enveloped_transition in
×
27
    State_hash.With_state_hashes.state_hash transition
×
28
end
29

30
module Registry = struct
31
  type element = State_hash.t
32

33
  let element_added _ =
34
    Mina_metrics.(
×
35
      Gauge.inc_one Transition_frontier_controller.transitions_being_processed)
36

37
  let element_removed _ _ =
38
    Mina_metrics.(
×
39
      Gauge.dec_one Transition_frontier_controller.transitions_being_processed)
40
end
41

42
include Cache_lib.Transmuter_cache.Make (Transmuter) (Registry) (Name)
8✔
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

© 2025 Coveralls, Inc