Skip to content

Commit 0bd4b30

Browse files
authored
Merge pull request #17844 from MinaProtocol/lyh/cleanup-snark-worker-events
Snark Worker > Events: Remove unused code
2 parents b973ce9 + 499a7c2 commit 0bd4b30

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

src/lib/snark_worker/events.ml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,3 @@
1-
open Core_kernel
2-
3-
module Time_span_with_json = struct
4-
type t = Time.Span.t
5-
6-
let to_yojson total = `String (Time.Span.to_string_hum total)
7-
8-
let of_yojson = function
9-
| `String time ->
10-
Ok (Time.Span.of_string time)
11-
| _ ->
12-
Error "Snark_worker.Functor: Could not parse timespan"
13-
end
14-
15-
(*FIX: register_event fails when adding base types to the constructors*)
16-
module String_with_json = struct
17-
type t = string
18-
19-
let to_yojson s = `String s
20-
21-
let of_yojson = function
22-
| `String s ->
23-
Ok s
24-
| _ ->
25-
Error "Snark_worker.Functor: Could not parse string"
26-
end
27-
28-
module Int_with_json = struct
29-
type t = int
30-
31-
let to_yojson s = `Int s
32-
33-
let of_yojson = function
34-
| `Int s ->
35-
Ok s
36-
| _ ->
37-
Error "Snark_worker.Functor: Could not parse int"
38-
end
39-
401
type Structured_log_events.t +=
412
| Generating_snark_work_failed of { error : Yojson.Safe.t }
423
[@@deriving register_event { msg = "Failed to generate SNARK work: $error" }]

0 commit comments

Comments
 (0)