summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-04-02 18:02:07 +0200
committerChristian Grothoff <christian@grothoff.org>2017-04-02 18:02:07 +0200
commitd8542d729ab8e285176bc29beb42ae7a19afa7e7 (patch)
tree4159ad02381c2ff5d89adf5c32feab3c944f0b1a /src/include
parent94dddbbe8281c71890eef1a9aa8384d99e26d5c2 (diff)
downloadexchange-d8542d729ab8e285176bc29beb42ae7a19afa7e7.tar.gz
exchange-d8542d729ab8e285176bc29beb42ae7a19afa7e7.tar.bz2
exchange-d8542d729ab8e285176bc29beb42ae7a19afa7e7.zip
implement returning /paybacks as part of reserve history (#3887)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h27
1 files changed, 20 insertions, 7 deletions
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);