aboutsummaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/Makefile.am3
-rw-r--r--src/exchange/taler-exchange-aggregator.c1
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c14
-rw-r--r--src/exchange/taler-exchange-httpd_validation.c19
-rw-r--r--src/exchange/taler-exchange-httpd_validation.h9
5 files changed, 10 insertions, 36 deletions
diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am
index 3dba0bb7..314bf8ba 100644
--- a/src/exchange/Makefile.am
+++ b/src/exchange/Makefile.am
@@ -94,4 +94,5 @@ EXTRA_DIST = \
test-taler-exchange-aggregator-postgres.conf \
test_taler_exchange_httpd_home/.local/share/taler/exchange/offline-keys/master.priv \
test_taler_exchange_httpd.conf \
- exchange.conf
+ exchange.conf \
+ $(check_SCRIPTS)
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index aeafd60f..7d9390ab 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -434,6 +434,7 @@ deposit_cb (void *cls,
au->row_id = row_id;
au->wire = (json_t *) wire;
au->execution_time = GNUNET_TIME_absolute_get ();
+ (void) GNUNET_TIME_round_abs (&au->execution_time);
TALER_JSON_hash (au->wire,
&au->h_wire);
json_incref (au->wire);
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index f8ff6722..c8a72f49 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -1131,7 +1131,7 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection,
&sig);
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
- "{s:o, s:o, s:o, s:o, s:o, s:o}",
+ "{s:o, s:o, s:o, s:o, s:o}",
"wtid", GNUNET_JSON_from_data (wtid,
sizeof (*wtid)),
"execution_time", GNUNET_JSON_from_time_abs (exec_time),
@@ -1184,14 +1184,14 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection,
&dd,
sizeof (struct TALER_WireDepositDetailP));
json_array_append (deposits,
- json_pack ("{s:o, s:o, s:o, s:I, s:o}",
- "deposit_value", TALER_JSON_from_amount (&wdd_pos->deposit_value),
- "deposit_fee", TALER_JSON_from_amount (&wdd_pos->deposit_fee),
+ json_pack ("{s:o, s:I, s:o, s:o, s:o}",
"H_contract", GNUNET_JSON_from_data (&wdd_pos->h_contract,
sizeof (struct GNUNET_HashCode)),
"transaction_id", (json_int_t) wdd_pos->transaction_id,
"coin_pub", GNUNET_JSON_from_data (&wdd_pos->coin_pub,
- sizeof (struct TALER_CoinSpendPublicKeyP))));
+ sizeof (struct TALER_CoinSpendPublicKeyP)),
+ "deposit_value", TALER_JSON_from_amount (&wdd_pos->deposit_value),
+ "deposit_fee", TALER_JSON_from_amount (&wdd_pos->deposit_fee)));
}
wdp.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT);
wdp.purpose.size = htonl (sizeof (struct TALER_WireDepositDataPS));
@@ -1206,11 +1206,11 @@ TMH_RESPONSE_reply_wire_deposit_details (struct MHD_Connection *connection,
&sig);
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
- "{s:o, s:o, s:o, s:o}",
+ "{s:o, s:o, s:o, s:o, s:o, s:o}",
"total", TALER_JSON_from_amount (total),
"merchant_pub", GNUNET_JSON_from_data (merchant_pub,
sizeof (struct TALER_MerchantPublicKeyP)),
- "h_wire", GNUNET_JSON_from_data (h_wire,
+ "H_wire", GNUNET_JSON_from_data (h_wire,
sizeof (struct GNUNET_HashCode)),
"deposits", deposits,
"exchange_sig", GNUNET_JSON_from_data (&sig,
diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c
index 830120a3..ba3543af 100644
--- a/src/exchange/taler-exchange-httpd_validation.c
+++ b/src/exchange/taler-exchange-httpd_validation.c
@@ -175,25 +175,6 @@ TMH_json_validate_wireformat (const json_t *wire,
/**
- * Check if we support the given wire method.
- *
- * @param type type of wire method to check
- * @return #GNUNET_YES if the method is supported
- */
-int
-TMH_VALIDATION_test_method (const char *type)
-{
- struct Plugin *p;
-
- for (p=wire_head;NULL != p;p = p->next)
- if (0 == strcasecmp (type,
- p->type))
- return GNUNET_YES;
- return GNUNET_NO;
-}
-
-
-/**
* Obtain JSON of the supported wire methods for a given
* account name prefix.
*
diff --git a/src/exchange/taler-exchange-httpd_validation.h b/src/exchange/taler-exchange-httpd_validation.h
index bd04994e..4ff50d08 100644
--- a/src/exchange/taler-exchange-httpd_validation.h
+++ b/src/exchange/taler-exchange-httpd_validation.h
@@ -54,15 +54,6 @@ int
TMH_json_validate_wireformat (const json_t *wire,
int ours);
-/**
- * Check if we support the given wire method.
- *
- * @param type type of wire method to check
- * @return #GNUNET_YES if the method is supported
- */
-int
-TMH_VALIDATION_test_method (const char *type);
-
/**
* Obtain JSON of the supported wire methods for a given