Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
psteckler committed Aug 24, 2020
1 parent 2bcd0f3 commit 9f92ecb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Expand Up @@ -438,7 +438,9 @@ module Breadcrumb_added_query = struct
String.concat ~sep:"\n"
[ testnet_log_filter
; coda_container_filter
; "\"Added breadcrumb user commands\"" ]
; Structured_log_events.id_to_string
Transition_frontier
.added_breadcrumb_user_commands_structured_events_id ]

let parse js : Result.t Or_error.t =
let open Json_parsing in
Expand Down
2 changes: 2 additions & 0 deletions src/lib/transition_frontier/frontier_base/frontier_intf.ml
Expand Up @@ -6,6 +6,8 @@ open Coda_base
module type S = sig
type t

type Structured_log_events.t += Added_breadcrumb_user_commands

val find_exn : t -> State_hash.t -> Breadcrumb.t

val max_length : t -> int
Expand Down
8 changes: 5 additions & 3 deletions src/lib/transition_frontier/transition_frontier.ml
Expand Up @@ -29,6 +29,9 @@ type t =
; extensions: Extensions.t
; genesis_state_hash: State_hash.t }

type Structured_log_events.t += Added_breadcrumb_user_commands
[@@deriving register_event]

let genesis_root_data ~precomputed_values =
let open Root_data.Limited in
let transition = External_transition.genesis ~precomputed_values in
Expand Down Expand Up @@ -305,13 +308,12 @@ let add_breadcrumb_exn t breadcrumb =
Breadcrumb.user_commands @@ Full_frontier.best_tip t.full_frontier
in
if not (List.is_empty user_cmds) then
[%log' trace t.logger]
[%str_log' trace t.logger] Added_breadcrumb_user_commands
~metadata:
[ ( "user_commands"
, `List
(List.map user_cmds
~f:(With_status.to_yojson User_command.to_yojson)) ) ]
"Added breadcrumb user commands" ;
~f:(With_status.to_yojson User_command.to_yojson)) ) ] ;
let lite_diffs =
List.map diffs ~f:Diff.(fun (Full.E.E diff) -> Lite.E.E (to_lite diff))
in
Expand Down

0 comments on commit 9f92ecb

Please sign in to comment.