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

MinaProtocol / mina / 493

19 Aug 2025 02:54AM UTC coverage: 30.695% (-1.5%) from 32.221%
493

push

buildkite

web-flow
Merge pull request #17583 from MinaProtocol/lyh/handle-work-partitioner-single-pool-correctly

Handle submission into work partitioner single pool correctly

0 of 7 new or added lines in 1 file covered. (0.0%)

642 existing lines in 60 files now uncovered.

6004 of 19560 relevant lines covered (30.7%)

18683.19 hits per line

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

25.0
/src/lib/cli_lib/background_daemon.ml
1
open Core
10✔
2
open Async
3

4
type state = Start | Run_client | Abort | No_daemon
5

6
let does_daemon_exist host_and_port =
7
  let open Deferred.Let_syntax in
×
8
  let%map result =
9
    Rpc.Connection.client (Tcp.Where_to_connect.of_host_and_port host_and_port)
×
10
  in
11
  Result.is_ok result
×
12

13
let run ~f (t : Host_and_port.t Flag.Types.with_name) arg =
14
  let rec go = function
×
15
    | Start ->
×
16
        let%bind has_daemon = does_daemon_exist t.value in
×
17
        if has_daemon then go Run_client else go No_daemon
×
18
    | No_daemon ->
×
19
        Print.printf
20
          !"Error: Unable to connect to Mina daemon.\n\
×
21
            - The daemon might not be running. See logs (in \
22
            `~/.mina-config/mina.log`) for details under the host:%s.\n\
23
           \  Run `mina daemon -help` to see how to start daemon.\n\
24
            - If you just started the daemon, wait a minute for the RPC server \
25
            to start.\n\
26
            - Alternatively, the daemon may not be running the RPC server on \
27
            %{sexp:Host_and_port.t}.\n\
28
           \  If so, add flag `-%s` with correct port when running this command.\n"
29
          (Host_and_port.host t.value)
×
30
          t.value t.name ;
31
        go Abort
×
32
    | Run_client ->
×
33
        f t.value arg
34
    | Abort ->
×
35
        exit 15
36
  in
37
  go Start
38

39
let rpc_init ~f arg_flag =
40
  let open Command.Param.Applicative_infix in
175✔
41
  Command.Param.return (fun port arg () -> run ~f port arg)
×
42
  <*> Flag.Host_and_port.Client.daemon <*> arg_flag
175✔
43

44
let graphql_init ~f arg_flag =
45
  let open Command.Param.Applicative_infix in
175✔
UNCOV
46
  Command.Param.return (fun rest_uri arg () -> f rest_uri arg)
×
47
  <*> Flag.Uri.Client.rest_graphql <*> arg_flag
14✔
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