diff options
-rw-r--r-- | src/exchange/taler-exchange-aggregator.c | 7 | ||||
-rw-r--r-- | src/exchangedb/pg_find_aggregation_transient.c | 16 | ||||
-rw-r--r-- | src/exchangedb/pg_find_aggregation_transient.h | 2 | ||||
-rw-r--r-- | src/exchangedb/pg_insert_aml_decision.c | 5 | ||||
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 2 |
5 files changed, 19 insertions, 13 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index 1f1ca4f81..e490c94f3 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -1065,6 +1065,8 @@ handle_transient_cb ( return false; } au->payto_uri = payto_uri; + TALER_full_payto_hash (payto_uri, + &au->h_full_payto); au->wtid = *wtid; au->merchant_pub = *merchant_pub; au->trans = *total; @@ -1113,6 +1115,9 @@ drain_kyc_alerts (void *cls) qs = db_plugin->drain_kyc_alert (db_plugin->cls, 1, &au.h_normalized_payto); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Found %d KYC alerts\n", + (int) qs); switch (qs) { case GNUNET_DB_STATUS_HARD_ERROR: @@ -1144,7 +1149,7 @@ drain_kyc_alerts (void *cls) au.ret = GNUNET_OK; qs = db_plugin->find_aggregation_transient (db_plugin->cls, - &au.h_full_payto, + &au.h_normalized_payto, &handle_transient_cb, &au); switch (qs) diff --git a/src/exchangedb/pg_find_aggregation_transient.c b/src/exchangedb/pg_find_aggregation_transient.c index 9aa495df7..813b3a81a 100644 --- a/src/exchangedb/pg_find_aggregation_transient.c +++ b/src/exchangedb/pg_find_aggregation_transient.c @@ -112,7 +112,7 @@ get_transients_cb (void *cls, enum GNUNET_DB_QueryStatus TEH_PG_find_aggregation_transient ( void *cls, - const struct TALER_FullPaytoHashP *h_payto, + const struct TALER_NormalizedPaytoHashP *h_payto, TALER_EXCHANGEDB_TransientAggregationCallback cb, void *cb_cls) { @@ -132,14 +132,14 @@ TEH_PG_find_aggregation_transient ( PREPARE (pg, "find_transient_aggregations", "SELECT" - " amount" - " ,wtid_raw" - " ,merchant_pub" - " ,payto_uri" - " FROM aggregation_transient atr" - " JOIN wire_targets wt" + " atr.amount" + " ,atr.wtid_raw" + " ,atr.merchant_pub" + " ,wt.payto_uri" + " FROM wire_targets wt" + " JOIN aggregation_transient atr" " USING (wire_target_h_payto)" - " WHERE atr.wire_target_h_payto=$1;"); + " WHERE wt.h_normalized_payto=$1;"); qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn, "find_transient_aggregations", params, diff --git a/src/exchangedb/pg_find_aggregation_transient.h b/src/exchangedb/pg_find_aggregation_transient.h index cb904b3ee..2475dec3c 100644 --- a/src/exchangedb/pg_find_aggregation_transient.h +++ b/src/exchangedb/pg_find_aggregation_transient.h @@ -36,7 +36,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_find_aggregation_transient ( void *cls, - const struct TALER_FullPaytoHashP *h_payto, + const struct TALER_NormalizedPaytoHashP *h_payto, TALER_EXCHANGEDB_TransientAggregationCallback cb, void *cb_cls); diff --git a/src/exchangedb/pg_insert_aml_decision.c b/src/exchangedb/pg_insert_aml_decision.c index d86bbbb2b..26fa329e8 100644 --- a/src/exchangedb/pg_insert_aml_decision.c +++ b/src/exchangedb/pg_insert_aml_decision.c @@ -96,8 +96,9 @@ TEH_PG_insert_aml_decision ( }; enum GNUNET_DB_QueryStatus qs; - TALER_full_payto_hash (payto_uri, - &h_full_payto); + if (NULL != payto_uri.full_payto) + TALER_full_payto_hash (payto_uri, + &h_full_payto); PREPARE (pg, "do_insert_aml_decision", "SELECT" diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index faeaf7615..0b9028de3 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -4757,7 +4757,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*find_aggregation_transient)( void *cls, - const struct TALER_FullPaytoHashP *h_payto, + const struct TALER_NormalizedPaytoHashP *h_payto, TALER_EXCHANGEDB_TransientAggregationCallback cb, void *cb_cls); |