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

MinaProtocol / mina / 2903

15 Nov 2024 01:59PM UTC coverage: 36.723% (-25.0%) from 61.682%
2903

Pull #16342

buildkite

dkijania
Merge branch 'dkijania/remove_publish_job_from_pr_comp' into dkijania/remove_publish_job_from_pr_dev
Pull Request #16342: [DEV] Publish debians only on nightly and stable

15 of 40 new or added lines in 14 files covered. (37.5%)

15175 existing lines in 340 files now uncovered.

24554 of 66863 relevant lines covered (36.72%)

20704.91 hits per line

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

68.18
/src/lib/mina_block/validated_block.ml
1
open Core_kernel
16✔
2
open Mina_base
3

4
[%%versioned
5
module Stable = struct
6
  module V2 = struct
7
    type t =
16✔
UNCOV
8
      Block.Stable.V2.t State_hash.With_state_hashes.Stable.V1.t
×
UNCOV
9
      * State_hash.Stable.V1.t Mina_stdlib.Nonempty_list.Stable.V1.t
×
10
    [@@deriving sexp, equal]
80✔
11

12
    let to_yojson (block_with_hashes, _) =
13
      State_hash.With_state_hashes.Stable.V1.to_yojson Block.Stable.V2.to_yojson
6✔
14
        block_with_hashes
15

16
    let to_latest = ident
17
  end
18
end]
19

20
type t = Stable.Latest.t
21

22
[%%define_locally Stable.Latest.(t_of_sexp, sexp_of_t, equal, to_yojson)]
23

24
let lift (b, v) =
25
  match v with
226✔
26
  | _, _, _, (`Delta_block_chain, Truth.True delta_block_chain_proof), _, _, _
226✔
27
    ->
28
      (b, delta_block_chain_proof)
29

30
let forget (b, _) = b
1,327✔
31

32
let remember (b, delta_block_chain_proof) =
33
  ( b
200✔
34
  , ( (`Time_received, Truth.True ())
35
    , (`Genesis_state, Truth.True ())
36
    , (`Proof, Truth.True ())
37
    , (`Delta_block_chain, Truth.True delta_block_chain_proof)
38
    , (`Frontier_dependencies, Truth.True ())
39
    , (`Staged_ledger_diff, Truth.True ())
40
    , (`Protocol_versions, Truth.True ()) ) )
41

42
let delta_block_chain_proof (_, d) = d
×
43

44
let valid_commands (block, _) =
45
  block |> With_hash.data |> Block.body
218✔
46
  |> Staged_ledger_diff.Body.staged_ledger_diff |> Staged_ledger_diff.commands
218✔
47
  |> List.map ~f:(fun cmd ->
48
         (* This is safe because at this point the stage ledger diff has been
49
              applied successfully. *)
50
         let (`If_this_is_used_it_should_have_a_comment_justifying_it data) =
480✔
51
           User_command.to_valid_unsafe cmd.data
52
         in
53
         { cmd with data } )
480✔
54

55
let unsafe_of_trusted_block ~delta_block_chain_proof
56
    (`This_block_is_trusted_to_be_safe b) =
57
  (b, delta_block_chain_proof)
206✔
58

59
let state_hash (b, _) = State_hash.With_state_hashes.state_hash b
481✔
60

61
let state_body_hash (t, _) =
UNCOV
62
  State_hash.With_state_hashes.state_body_hash t
×
63
    ~compute_hashes:
UNCOV
64
      (Fn.compose Mina_state.Protocol_state.hashes
×
UNCOV
65
         (Fn.compose Header.protocol_state Block.header) )
×
66

67
let header t = t |> forget |> With_hash.data |> Block.header
209✔
68

69
let body t = t |> forget |> With_hash.data |> Block.body
×
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