File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,10 @@ let apply_root_transitions ~logger ~db diffs =
5252 .message err ) ) )
5353 |> Result. ok_exn
5454 in
55- Transition_frontier.Persistent_frontier.Database. with_batch db
56- ~f: (fun batch ->
57- ( List. fold diffs ~init: initial_root_hash ~f: (fun old_root_hash diff ->
55+ let final_state_hash =
56+ Transition_frontier.Persistent_frontier.Database. with_batch db
57+ ~f: (fun batch ->
58+ List. fold diffs ~init: initial_root_hash ~f: (fun old_root_hash diff ->
5859 match diff with
5960 | Diff.Lite.E. E
6061 (Diff. Root_transitioned
@@ -71,11 +72,13 @@ let apply_root_transitions ~logger ~db diffs =
7172 (* Return new root hash for next iteration *)
7273 (Root_data.Limited.Stable.Latest. hashes new_root).state_hash
7374 | _ ->
74- failwith " Expected Root_transitioned diff" )
75- : State_hash. t )
76- |> ignore ) ;
75+ failwith " Expected Root_transitioned diff" ) )
76+ in
7777 [% log' info logger] " Successfully applied $count diffs"
78- ~metadata: [ (" count" , `Int (List. length diffs)) ] ;
78+ ~metadata:
79+ [ (" count" , `Int (List. length diffs))
80+ ; (" final_state_hash" , Frozen_ledger_hash. to_yojson final_state_hash)
81+ ] ;
7982 Ok ()
8083 with exn ->
8184 [% log' error logger] " Failed to apply root transitions: $error"
You can’t perform that action at this time.
0 commit comments