wip fix taler_amount, lookup_denomination_key
This commit is contained in:
parent
0c8ea5ba65
commit
ac0b346877
1 changed files with 21 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ let get_denoms t =
|
|||
Miou.Mutex.protect t.lock @@ fun () ->
|
||||
Hashtbl.to_seq_values t.denom_ht |> List.of_seq
|
||||
|
||||
[@@@ocaml.warning "-27"]
|
||||
|
||||
let add_master_signatures conn t l =
|
||||
Miou.Mutex.protect t.lock @@ fun () ->
|
||||
list_iter
|
||||
|
|
@ -22,6 +24,25 @@ let add_master_signatures conn t l =
|
|||
let denom = { denom with master_sig= Some master_sig } in
|
||||
let* () = Pg.add_denomination_key conn denom |> unwrap_err_caqti in
|
||||
Hashtbl.replace t.denom_ht h_denom_pub denom;
|
||||
let* ( valid_from,
|
||||
expire_withdraw,
|
||||
expire_deposit,
|
||||
expire_legal,
|
||||
coin,
|
||||
fee_withdraw,
|
||||
fee_deposit,
|
||||
fee_refresh,
|
||||
fee_refund,
|
||||
age_mask ) =
|
||||
Pg.lookup_denomination_key conn h_denom_pub
|
||||
|> unwrap_err_caqti
|
||||
|> Result.map Option.get
|
||||
in
|
||||
(*
|
||||
assert (valid_from = denom.stamp_start);
|
||||
assert (coin = denom.value);
|
||||
assert (age_mask = denom.age_mask);
|
||||
*)
|
||||
Ok ())
|
||||
l
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue