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* () =
|
let* () =
|
||||||
(* TODO O(n^2) *)
|
(* TODO O(n^2) *)
|
||||||
v.auditors
|
v.auditors
|
||||||
|> list_iter
|
|> List.concat_map
|
||||||
(fun
|
(fun
|
||||||
AuditorKeys.
|
AuditorKeys.
|
||||||
{ auditor_pub; auditor_url; auditor_name= _; denomination_keys }
|
{ auditor_pub; auditor_url; auditor_name= _; denomination_keys }
|
||||||
->
|
->
|
||||||
let auditor_url_hash = Hash.H64.hash auditor_url in
|
let auditor_url_hash = Hash.H64.hash auditor_url in
|
||||||
denomination_keys
|
denomination_keys
|
||||||
|> list_iter
|
|> List.map
|
||||||
(fun AuditorDenominationKey.{ denom_pub_h; auditor_sig } ->
|
(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 open Denomination in
|
||||||
let opt =
|
|
||||||
denom_l |> List.find_opt (fun dn -> dn.h_pub = denom_pub_h)
|
denom_l |> List.find_opt (fun dn -> dn.h_pub = denom_pub_h)
|
||||||
in
|
|> function
|
||||||
match opt with
|
|
||||||
| None -> Fmt.error "auditor denomination key not found"
|
| None -> Fmt.error "auditor denomination key not found"
|
||||||
| Some dn ->
|
| Some dn ->
|
||||||
let open Signatures.ExchangeKeyValidity in
|
let open Signatures.ExchangeKeyValidity in
|
||||||
|
|
@ -116,8 +117,8 @@ let keys content =
|
||||||
fee_withdraw= dn.fee_withdraw;
|
fee_withdraw= dn.fee_withdraw;
|
||||||
fee_deposit= dn.fee_deposit;
|
fee_deposit= dn.fee_deposit;
|
||||||
fee_refresh= dn.fee_refresh;
|
fee_refresh= dn.fee_refresh;
|
||||||
denom_hash= denom_pub_h;
|
denom_hash= dn.h_pub;
|
||||||
}))
|
})
|
||||||
in
|
in
|
||||||
|
|
||||||
Ok ()
|
Ok ()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue