Skip to content

Commit

Permalink
Reformat all files
Browse files Browse the repository at this point in the history
  • Loading branch information
Firobe committed May 9, 2022
1 parent 7139549 commit 61fa019
Show file tree
Hide file tree
Showing 446 changed files with 5,549 additions and 5,518 deletions.
4 changes: 2 additions & 2 deletions src/app/archive/archive_lib/diff.ml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module Builder = struct
let senders =
commands
|> List.map ~f:(fun { data; _ } ->
User_command.(fee_payer (forget_check data)))
User_command.(fee_payer (forget_check data)) )
|> Account_id.Set.of_list
in
let ledger =
Expand All @@ -79,7 +79,7 @@ module Builder = struct
let%map { receipt_chain_hash; _ } =
Ledger.get ledger ledger_location
in
(sender, receipt_chain_hash)))
(sender, receipt_chain_hash)) )
in
Transition_frontier.Breadcrumb_added
{ block = With_hash.map ~f:External_transition.compose block
Expand Down
14 changes: 7 additions & 7 deletions src/app/archive/archive_lib/metrics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Max_block_height = struct
Mina_metrics.(
Gauge.set
(Archive.max_block_height metric_server)
(Float.of_int max_height)))
(Float.of_int max_height)) )
end

module Missing_blocks = struct
Expand All @@ -38,7 +38,7 @@ module Missing_blocks = struct
LEFT JOIN blocks b
ON h = b.height WHERE b.height IS NULL) as v
|sql}
missing_blocks_width)
missing_blocks_width )

let update ~missing_blocks_width (module Conn : Caqti_async.CONNECTION)
metric_server =
Expand All @@ -48,7 +48,7 @@ module Missing_blocks = struct
Mina_metrics.(
Gauge.set
(Archive.missing_blocks metric_server)
(Float.of_int missing_blocks)))
(Float.of_int missing_blocks)) )
end

module Unparented_blocks = struct
Expand All @@ -68,19 +68,19 @@ module Unparented_blocks = struct
Mina_metrics.(
Gauge.set
(Archive.unparented_blocks metric_server)
(Float.of_int unparented_block_count)))
(Float.of_int unparented_block_count)) )
end

let log_error ~logger pool metric_server
(f :
(module Caqti_async.CONNECTION)
-> Mina_metrics.Archive.t
-> (unit, [> Caqti_error.call_or_retrieve ]) Deferred.Result.t) =
-> (unit, [> Caqti_error.call_or_retrieve ]) Deferred.Result.t ) =
let open Deferred.Let_syntax in
match%map
Caqti_async.Pool.use
(fun (module Conn : Caqti_async.CONNECTION) ->
f (module Conn) metric_server)
f (module Conn) metric_server )
pool
with
| Ok () ->
Expand All @@ -96,4 +96,4 @@ let update ~logger ~missing_blocks_width pool metric_server =
[ Max_block_height.update
; Unparented_blocks.update
; Missing_blocks.update ~missing_blocks_width
])
] )
Loading

0 comments on commit 61fa019

Please sign in to comment.