diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-10-30 17:36:57 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-10-30 17:36:57 +0100 |
commit | 2d55647f2aab1feb37d5439049f6824d11cda56c (patch) | |
tree | aef525c04a030b318a97b9d8ae77573ca73a8237 /src/exchangedb/pg_get_reserve_history.c | |
parent | 38a078d543f53ca4925ea364919306395e7e4597 (diff) | |
download | exchange-2d55647f2aab1feb37d5439049f6824d11cda56c.tar.gz exchange-2d55647f2aab1feb37d5439049f6824d11cda56c.tar.bz2 exchange-2d55647f2aab1feb37d5439049f6824d11cda56c.zip |
add support for reserve open/close operations to auditor, begin to split off purse auditing logic
Diffstat (limited to 'src/exchangedb/pg_get_reserve_history.c')
-rw-r--r-- | src/exchangedb/pg_get_reserve_history.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/exchangedb/pg_get_reserve_history.c b/src/exchangedb/pg_get_reserve_history.c index 893ba7db4..8b8e280a6 100644 --- a/src/exchangedb/pg_get_reserve_history.c +++ b/src/exchangedb/pg_get_reserve_history.c @@ -797,13 +797,14 @@ TEH_PG_get_reserve_history (void *cls, " FROM purse_merges pm" " JOIN purse_requests pr" " USING (purse_pub)" + " JOIN purse_decision pdes" + " USING (purse_pub)" " JOIN account_merges am" " ON (am.purse_pub = pm.purse_pub AND" " am.reserve_pub = pm.reserve_pub)" " WHERE pm.reserve_pub=$1" " AND pm.partner_serial_id=0" /* must be local! */ - " AND pr.finished" - " AND NOT pr.refunded;"); + " AND NOT pdes.refunded;"); PREPARE (pg, "history_by_reserve", "SELECT" @@ -1089,14 +1090,15 @@ TEH_PG_get_reserve_status (void *cls, " FROM purse_merges pm" " JOIN purse_requests pr" " USING (purse_pub)" + " JOIN purse_decision pdes" + " USING (purse_pub)" " JOIN account_merges am" " ON (am.purse_pub = pm.purse_pub AND" " am.reserve_pub = pm.reserve_pub)" " WHERE pm.reserve_pub=$1" " AND pm.merge_timestamp >= $2" " AND pm.partner_serial_id=0" /* must be local! */ - " AND pr.finished" - " AND NOT pr.refunded;"); + " AND NOT pdes.refunded;"); PREPARE (pg, "history_by_reserve_truncated", "SELECT" |