+ insert_auditor_denom_sig
This commit is contained in:
parent
2f8f7496bd
commit
c5cb16615e
1 changed files with 15 additions and 1 deletions
16
src/pg.ml
16
src/pg.ml
|
|
@ -172,6 +172,19 @@ let disable_auditor =
|
|||
fun (module Conn : CONN) ~auditor_pub ~change_date ->
|
||||
Conn.exec update_auditor (auditor_pub, "", "", false, change_date)
|
||||
|
||||
let insert_auditor_denom_sig =
|
||||
let insert_auditor_denom_sig =
|
||||
let auditor_sig = Bin_sig.ExchangeKeyValidity.caqti in
|
||||
Caqti_type.(t3 eddsa_pub denomination_hash auditor_sig ->. unit)
|
||||
"WITH ax AS (SELECT auditor_uuid FROM auditors WHERE auditor_pub=$1) \
|
||||
INSERT INTO auditor_denom_sigs (auditor_uuid, denominations_serial, \
|
||||
auditor_sig) SELECT ax.auditor_uuid, denominations_serial, $3 FROM \
|
||||
denominations CROSS JOIN ax WHERE denom_pub_hash=$2 ON CONFLICT DO \
|
||||
NOTHING"
|
||||
in
|
||||
fun (module Conn : CONN) ~auditor_pub ~h_denom_pub ~auditor_sig ->
|
||||
Conn.exec insert_auditor_denom_sig (auditor_pub, h_denom_pub, auditor_sig)
|
||||
|
||||
let insert_wire_fee =
|
||||
let insert_wire_fee =
|
||||
let master_sig = Bin_sig.MasterWireFee.caqti in
|
||||
|
|
@ -319,6 +332,7 @@ let insert_partner =
|
|||
fun (module Conn : CONN) v -> Conn.exec insert_partner v
|
||||
|
||||
(* TODO
|
||||
iterate_auditor_denominations
|
||||
iterate_active_auditors
|
||||
iterate_auditor_denominations
|
||||
get_recoup_denoms
|
||||
*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue