This commit is contained in:
parent
6a44f4a088
commit
18b5bf0726
1 changed files with 25 additions and 24 deletions
|
|
@ -87,20 +87,21 @@ let keys content =
|
|||
let* () =
|
||||
(* TODO O(n^2) *)
|
||||
v.auditors
|
||||
|> list_iter
|
||||
|> List.concat_map
|
||||
(fun
|
||||
AuditorKeys.
|
||||
{ auditor_pub; auditor_url; auditor_name= _; denomination_keys }
|
||||
->
|
||||
let auditor_url_hash = Hash.H64.hash auditor_url in
|
||||
denomination_keys
|
||||
|> list_iter
|
||||
|> List.map
|
||||
(fun AuditorDenominationKey.{ denom_pub_h; auditor_sig } ->
|
||||
(denom_pub_h, auditor_url_hash, auditor_pub, auditor_sig)))
|
||||
|> list_iter
|
||||
(fun (denom_pub_h, auditor_url_hash, auditor_pub, auditor_sig) ->
|
||||
let open Denomination in
|
||||
let opt =
|
||||
denom_l |> List.find_opt (fun dn -> dn.h_pub = denom_pub_h)
|
||||
in
|
||||
match opt with
|
||||
|> function
|
||||
| None -> Fmt.error "auditor denomination key not found"
|
||||
| Some dn ->
|
||||
let open Signatures.ExchangeKeyValidity in
|
||||
|
|
@ -116,8 +117,8 @@ let keys content =
|
|||
fee_withdraw= dn.fee_withdraw;
|
||||
fee_deposit= dn.fee_deposit;
|
||||
fee_refresh= dn.fee_refresh;
|
||||
denom_hash= denom_pub_h;
|
||||
}))
|
||||
denom_hash= dn.h_pub;
|
||||
})
|
||||
in
|
||||
|
||||
Ok ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue