From d8542d729ab8e285176bc29beb42ae7a19afa7e7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 2 Apr 2017 18:02:07 +0200 Subject: implement returning /paybacks as part of reserve history (#3887) --- src/include/taler_exchangedb_plugin.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'src/include/taler_exchangedb_plugin.h') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 781d4e60d..37040d39a 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -153,14 +153,9 @@ struct TALER_EXCHANGEDB_Payback { /** - * Which coin was paid back? + * Public key of the coin that was paid back. */ - struct TALER_CoinPublicInfo coin; - - /** - * How much was the coin still worth at this time? - */ - struct TALER_Amount value; + struct TALER_CoinSpendPublicKeyP coin_pub; /** * Blinding factor supplied to prove to the exchange that @@ -179,6 +174,22 @@ struct TALER_EXCHANGEDB_Payback */ struct TALER_ReservePublicKeyP reserve_pub; + /** + * How much was the coin still worth at this time? + */ + struct TALER_Amount value; + + /** + * When did the /payback operation happen? + */ + struct GNUNET_TIME_Absolute timestamp; + + /** + * Public key representing the denomination of + * @e coin_pub. + */ + struct TALER_DenominationPublicKey denom_pub; + }; @@ -1944,6 +1955,7 @@ struct TALER_EXCHANGEDB_Plugin * @param h_blind_ev blinded envelope, as calculated by the exchange * @param amount total amount to be paid back * @param receiver_account_details who should receive the funds + * @parma h_blind_ev hash of the blinded coin's envelope (must match reserves_out entry) * @param[out] deadline set to absolute time by when the exchange plans to pay it back * @return #GNUNET_OK on success, * #GNUNET_SYSERR on DB errors @@ -1956,6 +1968,7 @@ struct TALER_EXCHANGEDB_Plugin const struct TALER_CoinSpendSignatureP *coin_sig, const struct TALER_DenominationBlindingKeyP *coin_blind, const struct TALER_Amount *amount, + const struct GNUNET_HashCode *h_blind_ev, struct GNUNET_TIME_Absolute *deadline); -- cgit v1.2.3