~ HashCode.to_denomination_hash
This commit is contained in:
parent
cf20d60bb6
commit
32fa5b1fc3
2 changed files with 4 additions and 11 deletions
|
|
@ -99,9 +99,7 @@ let mk_future_keys_response ~(sm_signkey : Secmod_signkey.t)
|
|||
let verify_denom_signature ~sm_denom DenomSignature.{ h_denom_pub; master_sig }
|
||||
=
|
||||
let open Syntax in
|
||||
let denom_hash =
|
||||
Bin_type.DenominationHash.of_octets (HashCode.to_octets h_denom_pub)
|
||||
in
|
||||
let denom_hash = HashCode.to_denomination_hash h_denom_pub in
|
||||
let* denom =
|
||||
Secmod_denom.get_denoms sm_denom
|
||||
|> List.find_opt (fun (denom : Denomination.t) -> denom.h_pub = denom_hash)
|
||||
|
|
@ -172,10 +170,7 @@ let update_master_signatures ~db_conn ~sm_signkey ~sm_denom
|
|||
let* () =
|
||||
denom_sigs
|
||||
|> List.map (fun DenomSignature.{ h_denom_pub; master_sig } ->
|
||||
(* TODO better denomination-hash type *)
|
||||
let h_denom_pub =
|
||||
Bin_type.DenominationHash.of_octets (HashCode.to_octets h_denom_pub)
|
||||
in
|
||||
let h_denom_pub = HashCode.to_denomination_hash h_denom_pub in
|
||||
(h_denom_pub, master_sig))
|
||||
|> Secmod_denom.add_master_signatures db_conn sm_denom
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue