summaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-24 00:52:33 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-24 00:52:33 +0200
commit6772037321c96aed73e898e3328286c219bcf7c8 (patch)
treef614b63f7788b38140433f7d960b7ddb98ee79b6 /src/exchangedb/plugin_exchangedb_postgres.c
parentde61e06eb164c5cb05778aba8e448a001462b783 (diff)
downloadexchange-6772037321c96aed73e898e3328286c219bcf7c8.tar.gz
exchange-6772037321c96aed73e898e3328286c219bcf7c8.tar.bz2
exchange-6772037321c96aed73e898e3328286c219bcf7c8.zip
fix invariant check
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index e517d069b..5bd674b2d 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -4006,9 +4006,9 @@ struct CoinHistoryContext
bool failed;
/**
- * Set to 'true' if we found a deposit (for invariant check).
+ * Set to 'true' if we found a deposit or melt (for invariant check).
*/
- bool have_deposit;
+ bool have_deposit_or_melt;
};
@@ -4034,7 +4034,7 @@ add_coin_deposit (void *cls,
struct TALER_EXCHANGEDB_TransactionList *tl;
uint64_t serial_id;
- chc->have_deposit = true;
+ chc->have_deposit_or_melt = true;
deposit = GNUNET_new (struct TALER_EXCHANGEDB_DepositListEntry);
{
struct GNUNET_PQ_ResultSpec rs[] = {
@@ -4106,6 +4106,7 @@ add_coin_melt (void *cls,
struct TALER_EXCHANGEDB_TransactionList *tl;
uint64_t serial_id;
+ chc->have_deposit_or_melt = true;
melt = GNUNET_new (struct TALER_EXCHANGEDB_MeltListEntry);
{
struct GNUNET_PQ_ResultSpec rs[] = {
@@ -4512,7 +4513,7 @@ postgres_get_coin_transactions (
*tlp = chc.head;
if (NULL == chc.head)
return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
- GNUNET_break (chc.have_deposit);
+ GNUNET_break (chc.have_deposit_or_melt);
return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
}