From 8f9e098aaed6519fbf6045525c573876c6572471 Mon Sep 17 00:00:00 2001 From: swrup Date: Thu, 26 Feb 2026 20:12:35 +0100 Subject: [PATCH] --- src/http_info.ml | 3 +++ src/http_management.ml | 46 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/http_info.ml b/src/http_info.ml index a8793388..ed01f380 100644 --- a/src/http_info.ml +++ b/src/http_info.ml @@ -114,6 +114,9 @@ let mk_keys ~db_conn (module Keys : Keys.S) ~last_issue_date = let* global_fees = Pg.get_global_fees db_conn ~start_date:Timestamp.zero |> unwrap_err_caqti in + let () = + List.iter Http_management.Global_fees.print_global_fees global_fees + in let* auditors = (* /auditors/$AUDITOR_PUB/$H_DENOM_PUB *) Pg.get_auditor_keys db_conn diff --git a/src/http_management.ml b/src/http_management.ml index f1ef75b6..79b12039 100644 --- a/src/http_management.ml +++ b/src/http_management.ml @@ -292,6 +292,51 @@ module Wire_fee = struct end module Global_fees = struct + let print_global_fees + GlobalFees. + { + start_date; + end_date; + purse_timeout; + history_expiration; + history_fee; + account_fee; + purse_fee; + purse_account_limit; + master_sig= _; + } = + let pp_timestamp ppf ts = + let s = Bin.to_string Timestamp.bin ts in + Fmt.pf ppf "%S" s + in + let pp_duration ppf d = + let s = Bin.to_string Time.TimeRelative.bin d in + Fmt.pf ppf "%S" s + in + let pp_amount ppf amount = + let s = Bin.to_string Amount.bin amount in + Fmt.pf ppf "%S" s + in + Fmt.epr + {| + { + start_date = %a; + end_date = %a; + purse_timeout = %a; + history_expiration = %a; + history_fee = %a; + account_fee = %a; + purse_fee = %a; + purse_account_limit = %lu; + master_sig = ..; + } + |} + pp_timestamp start_date pp_timestamp end_date pp_duration purse_timeout + pp_duration history_expiration pp_amount history_fee pp_amount account_fee + pp_amount purse_fee purse_account_limit; + + () + let verify (module Keys : Keys.S) GlobalFees. { @@ -337,6 +382,7 @@ module Global_fees = struct "a different global-fees was already setup for this time frame" | true -> Logs.info (fun m -> m "an identical global-fees was already setup"); + let () = print_global_fees vv in Ok ()) | _ -> Error