This commit is contained in:
parent
261cece0e3
commit
8f9e098aae
2 changed files with 49 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue