From b65a2f77eb19b23063a5b73bc9ce5fb2e3622431 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 28 Nov 2020 18:56:29 +0100 Subject: sketch logic for wire-fee management endpoint --- src/include/taler_exchangedb_plugin.h | 41 ++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'src/include') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 159141f85..60ad0e65d 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -3172,12 +3172,41 @@ struct TALER_EXCHANGEDB_Plugin * @return transaction status code */ enum GNUNET_DB_QueryStatus - (*insert_auditor_denom_sig)(void *cls, - struct TALER_EXCHANGEDB_Session *session, - const struct GNUNET_HashCode *h_denom_pub, - const struct TALER_AuditorPublicKeyP *auditor_pub, - const struct - TALER_AuditorSignatureP *auditor_sig); + (*insert_auditor_denom_sig)( + void *cls, + struct TALER_EXCHANGEDB_Session *session, + const struct GNUNET_HashCode *h_denom_pub, + const struct TALER_AuditorPublicKeyP *auditor_pub, + const struct TALER_AuditorSignatureP *auditor_sig); + + + /** + * Lookup information about known wire fees. + * + * @param cls closure + * @param session a session + * @param wire_method the wire method to lookup fees for + * @param start_time starting time of fee + * @param end_time end time of fee + * @param[out] wire_fee wire fee for that time period; if + * different wire fee exists within this time + * period, an 'invalid' amount is returned. + * @param[out] closing_fee wire fee for that time period; if + * different wire fee exists within this time + * period, an 'invalid' amount is returned. + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*lookup_wire_fee_by_time)( + void *cls, + struct TALER_EXCHANGEDB_Session *session, + const char *wire_method, + struct GNUNET_TIME_Absolute start_time, + struct GNUNET_TIME_Absolute end_time, + struct TALER_Amount *wire_fee, + struct TALER_Amount *closing_fee); + + }; #endif /* _TALER_EXCHANGE_DB_H */ -- cgit v1.2.3