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/exchange | |
| parent | 38a078d543f53ca4925ea364919306395e7e4597 (diff) | |
add support for reserve open/close operations to auditor, begin to split off purse auditing logic
Diffstat (limited to 'src/exchange')
| -rw-r--r-- | src/exchange/taler-exchange-closer.c | 8 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-httpd_purses_create.c | 4 | 
2 files changed, 10 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c index eacfa5d5..41c6436a 100644 --- a/src/exchange/taler-exchange-closer.c +++ b/src/exchange/taler-exchange-closer.c @@ -204,6 +204,8 @@ commit_or_warn (void)   * @param account_payto_uri information about the bank account that initially   *        caused the reserve to be created   * @param expiration_date when did the reserve expire + * @param close_request_row row of request asking for + *         closure, 0 for expired reserves   * @return #GNUNET_OK on success (continue)   *         #GNUNET_NO on non-fatal errors (try again)   *         #GNUNET_SYSERR on fatal errors (abort) @@ -213,7 +215,8 @@ expired_reserve_cb (void *cls,                      const struct TALER_ReservePublicKeyP *reserve_pub,                      const struct TALER_Amount *left,                      const char *account_payto_uri, -                    struct GNUNET_TIME_Timestamp expiration_date) +                    struct GNUNET_TIME_Timestamp expiration_date, +                    uint64_t close_request_row)  {    struct GNUNET_TIME_Timestamp now;    struct TALER_WireTransferIdentifierRawP wtid; @@ -319,7 +322,8 @@ expired_reserve_cb (void *cls,                                           account_payto_uri,                                           &wtid,                                           left, -                                         &closing_fee); +                                         &closing_fee, +                                         close_request_row);    GNUNET_log (GNUNET_ERROR_TYPE_INFO,                "Closing reserve %s over %s (%d, %d)\n",                TALER_B2S (reserve_pub), diff --git a/src/exchange/taler-exchange-httpd_purses_create.c b/src/exchange/taler-exchange-httpd_purses_create.c index 07835789..2bccd11f 100644 --- a/src/exchange/taler-exchange-httpd_purses_create.c +++ b/src/exchange/taler-exchange-httpd_purses_create.c @@ -231,6 +231,10 @@ create_transaction (void *cls,      }      if (! balance_ok)      { +      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, +                  "Coin %s has insufficient balance for purse deposit of amount %s\n", +                  TALER_B2S (&coin->cpi.coin_pub), +                  TALER_amount2s (&coin->amount));        *mhd_ret          = TEH_RESPONSE_reply_coin_insufficient_funds (              connection,  | 
