diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-11-01 05:01:10 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-11-05 10:37:37 +0100 |
commit | 8a20040e18df6b6177e433b9e62f2ee2e2173b42 (patch) | |
tree | f15d9bb7ae4a89f1227ce8186131864f1de521e6 | |
parent | 4d97a94d5a3a91eae84adb6e1626b9d2a71e3943 (diff) |
working through DB
-rw-r--r-- | src/exchangedb/pg_get_coin_transactions.c | 3 | ||||
-rw-r--r-- | src/exchangedb/pg_get_reserve_history.c | 15 | ||||
-rw-r--r-- | src/exchangedb/pg_insert_close_request.c | 4 | ||||
-rw-r--r-- | src/exchangedb/pg_insert_records_by_table.c | 8 | ||||
-rw-r--r-- | src/exchangedb/pg_iterate_reserve_close_info.h | 2 | ||||
-rw-r--r-- | src/exchangedb/pg_lookup_records_by_table.c | 6 | ||||
-rw-r--r-- | src/exchangedb/pg_select_coin_deposits_above_serial_id.c | 2 | ||||
-rw-r--r-- | src/exchangedb/pg_select_reserve_close_info.c | 4 | ||||
-rw-r--r-- | src/exchangedb/pg_select_reserve_closed_above_serial_id.c | 4 | ||||
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 2 |
10 files changed, 26 insertions, 24 deletions
diff --git a/src/exchangedb/pg_get_coin_transactions.c b/src/exchangedb/pg_get_coin_transactions.c index 2abdb1e0d..69de91117 100644 --- a/src/exchangedb/pg_get_coin_transactions.c +++ b/src/exchangedb/pg_get_coin_transactions.c @@ -117,7 +117,8 @@ add_coin_deposit (void *cls, GNUNET_PQ_result_spec_auto_from_type ("wire_salt", &deposit->wire_salt), GNUNET_PQ_result_spec_string ("payto_uri", - &deposit->receiver_wire_account), + &deposit->receiver_wire_account.full_payto + ), GNUNET_PQ_result_spec_auto_from_type ("coin_sig", &deposit->csig), GNUNET_PQ_result_spec_uint64 ("coin_deposit_serial_id", diff --git a/src/exchangedb/pg_get_reserve_history.c b/src/exchangedb/pg_get_reserve_history.c index 1f1ca95b5..331d016aa 100644 --- a/src/exchangedb/pg_get_reserve_history.c +++ b/src/exchangedb/pg_get_reserve_history.c @@ -138,7 +138,7 @@ add_bank_to_exchange (void *cls, GNUNET_PQ_result_spec_timestamp ("execution_date", &bt->execution_date), GNUNET_PQ_result_spec_string ("sender_account_details", - &bt->sender_account_details), + &bt->sender_account_details.full_payto), GNUNET_PQ_result_spec_end }; @@ -321,7 +321,8 @@ add_exchange_to_bank (void *cls, GNUNET_PQ_result_spec_timestamp ("execution_date", &closing->execution_date), GNUNET_PQ_result_spec_string ("receiver_account", - &closing->receiver_account_details), + &closing->receiver_account_details. + full_payto), GNUNET_PQ_result_spec_auto_from_type ("wtid", &closing->wtid), GNUNET_PQ_result_spec_end @@ -517,12 +518,12 @@ add_close_requests (void *cls, crq = GNUNET_new (struct TALER_EXCHANGEDB_CloseRequest); { - char *payto_uri; + struct TALER_FullPayto payto_uri; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_timestamp ("close_timestamp", &crq->request_timestamp), GNUNET_PQ_result_spec_string ("payto_uri", - &payto_uri), + &payto_uri.full_payto), GNUNET_PQ_result_spec_auto_from_type ("reserve_sig", &crq->reserve_sig), GNUNET_PQ_result_spec_end @@ -538,9 +539,9 @@ add_close_requests (void *cls, rhc->failed = true; return; } - TALER_payto_hash (payto_uri, - &crq->target_account_h_payto); - GNUNET_free (payto_uri); + TALER_full_payto_hash (payto_uri, + &crq->target_account_h_payto); + GNUNET_free (payto_uri.full_payto); } crq->reserve_pub = *rhc->reserve_pub; tail = append_rh (rhc); diff --git a/src/exchangedb/pg_insert_close_request.c b/src/exchangedb/pg_insert_close_request.c index b4bc5f4a7..c9d3bdc76 100644 --- a/src/exchangedb/pg_insert_close_request.c +++ b/src/exchangedb/pg_insert_close_request.c @@ -30,7 +30,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_insert_close_request ( void *cls, const struct TALER_ReservePublicKeyP *reserve_pub, - const char *payto_uri, + const struct TALER_FullPayto payto_uri, const struct TALER_ReserveSignatureP *reserve_sig, struct GNUNET_TIME_Timestamp request_timestamp, const struct TALER_Amount *balance, @@ -45,7 +45,7 @@ TEH_PG_insert_close_request ( balance), TALER_PQ_query_param_amount (pg->conn, closing_fee), - GNUNET_PQ_query_param_string (payto_uri), + GNUNET_PQ_query_param_string (payto_uri.full_payto), GNUNET_PQ_query_param_end }; diff --git a/src/exchangedb/pg_insert_records_by_table.c b/src/exchangedb/pg_insert_records_by_table.c index 6af79e64c..3353cd0fc 100644 --- a/src/exchangedb/pg_insert_records_by_table.c +++ b/src/exchangedb/pg_insert_records_by_table.c @@ -175,7 +175,7 @@ irbt_cb_table_wire_targets (struct PostgresClosure *pg, GNUNET_PQ_query_param_auto_from_type (&full_payto_hash), GNUNET_PQ_query_param_auto_from_type (&normalized_payto_hash), GNUNET_PQ_query_param_string ( - td->details.wire_targets.payto_uri), + td->details.wire_targets.full_payto_uri.full_payto), GNUNET_PQ_query_param_auto_from_type ( &td->details.wire_targets.access_token), td->details.wire_targets.no_account @@ -190,7 +190,7 @@ irbt_cb_table_wire_targets (struct PostgresClosure *pg, &full_payto_hash); TALER_full_payto_normalize_and_hash ( td->details.wire_targets.full_payto_uri, - &h_normalized_payto); + &normalized_payto_hash); PREPARE (pg, "insert_into_table_wire_targets", "INSERT INTO wire_targets" @@ -1788,7 +1788,7 @@ irbt_cb_table_close_requests (struct PostgresClosure *pg, pg->conn, &td->details.close_requests.close_fee), GNUNET_PQ_query_param_string ( - td->details.close_requests.payto_uri), + td->details.close_requests.payto_uri.full_payto), GNUNET_PQ_query_param_end }; @@ -2025,7 +2025,7 @@ irbt_cb_table_profit_drains (struct PostgresClosure *pg, GNUNET_PQ_query_param_string ( td->details.profit_drains.account_section), GNUNET_PQ_query_param_string ( - td->details.profit_drains.payto_uri), + td->details.profit_drains.payto_uri.full_payto), GNUNET_PQ_query_param_timestamp ( &td->details.profit_drains.trigger_date), TALER_PQ_query_param_amount ( diff --git a/src/exchangedb/pg_iterate_reserve_close_info.h b/src/exchangedb/pg_iterate_reserve_close_info.h index 55cd5f487..a06002bdc 100644 --- a/src/exchangedb/pg_iterate_reserve_close_info.h +++ b/src/exchangedb/pg_iterate_reserve_close_info.h @@ -40,7 +40,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_iterate_reserve_close_info ( void *cls, - const struct TALER_NormalizedPaytoHashP *h_payto, + const struct TALER_FullPaytoHashP *h_payto, struct GNUNET_TIME_Absolute time_limit, TALER_EXCHANGEDB_KycAmountCallback kac, void *kac_cls); diff --git a/src/exchangedb/pg_lookup_records_by_table.c b/src/exchangedb/pg_lookup_records_by_table.c index e8c6f8fa1..cbc0d1a72 100644 --- a/src/exchangedb/pg_lookup_records_by_table.c +++ b/src/exchangedb/pg_lookup_records_by_table.c @@ -223,7 +223,7 @@ lrbt_cb_table_wire_targets (void *cls, &td.details.wire_targets.no_account), GNUNET_PQ_result_spec_string ( "payto_uri", - &td.details.wire_targets.payto_uri), + &td.details.wire_targets.full_payto_uri.full_payto), GNUNET_PQ_result_spec_end }; @@ -2197,7 +2197,7 @@ lrbt_cb_table_close_requests (void *cls, &td.details.close_requests.close_fee), GNUNET_PQ_result_spec_string ( "payto_uri", - &td.details.close_requests.payto_uri), + &td.details.close_requests.payto_uri.full_payto), GNUNET_PQ_result_spec_end }; @@ -2505,7 +2505,7 @@ lrbt_cb_table_profit_drains (void *cls, &td.details.profit_drains.account_section), GNUNET_PQ_result_spec_string ( "payto_uri", - &td.details.profit_drains.payto_uri), + &td.details.profit_drains.payto_uri.full_payto), GNUNET_PQ_result_spec_timestamp ( "trigger_date", &td.details.profit_drains.trigger_date), diff --git a/src/exchangedb/pg_select_coin_deposits_above_serial_id.c b/src/exchangedb/pg_select_coin_deposits_above_serial_id.c index 000b908ed..2747b9dcc 100644 --- a/src/exchangedb/pg_select_coin_deposits_above_serial_id.c +++ b/src/exchangedb/pg_select_coin_deposits_above_serial_id.c @@ -108,7 +108,7 @@ coin_deposit_serial_helper_cb (void *cls, GNUNET_PQ_result_spec_auto_from_type ("wire_salt", &deposit.wire_salt), GNUNET_PQ_result_spec_string ("receiver_wire_account", - &deposit.receiver_wire_account), + &deposit.receiver_wire_account.full_payto), GNUNET_PQ_result_spec_bool ("done", &done), GNUNET_PQ_result_spec_uint64 ("coin_deposit_serial_id", diff --git a/src/exchangedb/pg_select_reserve_close_info.c b/src/exchangedb/pg_select_reserve_close_info.c index fff07944b..6194e1ed3 100644 --- a/src/exchangedb/pg_select_reserve_close_info.c +++ b/src/exchangedb/pg_select_reserve_close_info.c @@ -31,7 +31,7 @@ TEH_PG_select_reserve_close_info ( void *cls, const struct TALER_ReservePublicKeyP *reserve_pub, struct TALER_Amount *balance, - char **payto_uri) + struct TALER_FullPayto *payto_uri) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -43,7 +43,7 @@ TEH_PG_select_reserve_close_info ( pg->currency, balance), GNUNET_PQ_result_spec_string ("payto_uri", - payto_uri), + &payto_uri->full_payto), GNUNET_PQ_result_spec_end }; diff --git a/src/exchangedb/pg_select_reserve_closed_above_serial_id.c b/src/exchangedb/pg_select_reserve_closed_above_serial_id.c index 7efba3c2a..2b5267b4c 100644 --- a/src/exchangedb/pg_select_reserve_closed_above_serial_id.c +++ b/src/exchangedb/pg_select_reserve_closed_above_serial_id.c @@ -74,7 +74,7 @@ reserve_closed_serial_helper_cb (void *cls, { uint64_t rowid; struct TALER_ReservePublicKeyP reserve_pub; - char *receiver_account; + struct TALER_FullPayto receiver_account; struct TALER_WireTransferIdentifierRawP wtid; struct TALER_Amount amount_with_fee; struct TALER_Amount closing_fee; @@ -90,7 +90,7 @@ reserve_closed_serial_helper_cb (void *cls, GNUNET_PQ_result_spec_auto_from_type ("wtid", &wtid), GNUNET_PQ_result_spec_string ("receiver_account", - &receiver_account), + &receiver_account.full_payto), TALER_PQ_RESULT_SPEC_AMOUNT ("amount", &amount_with_fee), TALER_PQ_RESULT_SPEC_AMOUNT ("closing_fee", diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 2cf845d79..8f35dba1a 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -5232,7 +5232,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*iterate_reserve_close_info)( void *cls, - const struct TALER_NormalizedPaytoHashP *h_payto, + const struct TALER_FullPaytoHashP *h_payto, struct GNUNET_TIME_Absolute time_limit, TALER_EXCHANGEDB_KycAmountCallback kac, void *kac_cls); |