diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-07-24 12:19:36 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-07-24 12:19:36 +0200 |
commit | a654ceafba1b6f75bc1ec7c148ff6bc4336a47c5 (patch) | |
tree | 219e71226d279ede0baccdb81f330116f4a56a26 /src/include | |
parent | 9e3f4bdd791f87df25cfd2b818c7ef385b78b35d (diff) | |
download | exchange-a654ceafba1b6f75bc1ec7c148ff6bc4336a47c5.tar.xz |
make sure reserves are not gc'ed before legal expiration
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_exchangedb_lib.h | 4 | ||||
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 31 |
2 files changed, 21 insertions, 14 deletions
diff --git a/src/include/taler_exchangedb_lib.h b/src/include/taler_exchangedb_lib.h index 0d06c1881..da744506c 100644 --- a/src/include/taler_exchangedb_lib.h +++ b/src/include/taler_exchangedb_lib.h @@ -191,8 +191,8 @@ typedef int */ typedef int (*TALER_EXCHANGEDB_RevocationIterator)(void *cls, - const struct GNUNET_HashCode *denom_hash, - const struct TALER_MasterSignatureP *revocation_master_sig); + const struct GNUNET_HashCode *denom_hash, + const struct TALER_MasterSignatureP *revocation_master_sig); /** diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 104ae8059..342957f69 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -127,9 +127,16 @@ struct TALER_EXCHANGEDB_Reserve struct TALER_Amount balance; /** - * The expiration date of this reserve + * The expiration date of this reserve; funds will be wired back + * at this time. */ struct GNUNET_TIME_Absolute expiry; + + /** + * The legal expiration date of this reserve; we will forget about + * it at this time. + */ + struct GNUNET_TIME_Absolute gc; }; @@ -2011,10 +2018,10 @@ struct TALER_EXCHANGEDB_Plugin */ enum GNUNET_DB_QueryStatus (*get_expired_reserves)(void *cls, - struct TALER_EXCHANGEDB_Session *session, - struct GNUNET_TIME_Absolute now, - TALER_EXCHANGEDB_ReserveExpiredCallback rec, - void *rec_cls); + struct TALER_EXCHANGEDB_Session *session, + struct GNUNET_TIME_Absolute now, + TALER_EXCHANGEDB_ReserveExpiredCallback rec, + void *rec_cls); /** @@ -2032,13 +2039,13 @@ struct TALER_EXCHANGEDB_Plugin */ enum GNUNET_DB_QueryStatus (*insert_reserve_closed)(void *cls, - struct TALER_EXCHANGEDB_Session *session, - const struct TALER_ReservePublicKeyP *reserve_pub, - struct GNUNET_TIME_Absolute execution_date, - const char *receiver_account, - const struct TALER_WireTransferIdentifierRawP *wtid, - const struct TALER_Amount *amount_with_fee, - const struct TALER_Amount *closing_fee); + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_ReservePublicKeyP *reserve_pub, + struct GNUNET_TIME_Absolute execution_date, + const char *receiver_account, + const struct TALER_WireTransferIdentifierRawP *wtid, + const struct TALER_Amount *amount_with_fee, + const struct TALER_Amount *closing_fee); /** |