diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-30 21:26:40 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-30 21:26:40 +0200 |
commit | 2faf102a05865b68e90ef48f292678dd1da6356e (patch) | |
tree | 5196e22766c0d5f0692d30121bda0b0e25527aa2 /src/exchangedb/lrbt_callbacks.c | |
parent | bc57abc3daa56178378b5184b9ec987c860c5f62 (diff) |
-more dB work
Diffstat (limited to 'src/exchangedb/lrbt_callbacks.c')
-rw-r--r-- | src/exchangedb/lrbt_callbacks.c | 99 |
1 files changed, 53 insertions, 46 deletions
diff --git a/src/exchangedb/lrbt_callbacks.c b/src/exchangedb/lrbt_callbacks.c index 2edff5584..f52fc3ab5 100644 --- a/src/exchangedb/lrbt_callbacks.c +++ b/src/exchangedb/lrbt_callbacks.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet - Copyright (C) 2020 Taler Systems SA + Copyright (C) 2020, 2021 Taler Systems SA GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -156,7 +156,6 @@ lrbt_cb_table_wire_targets (void *cls, unsigned int num_results) { struct LookupRecordsByTableContext *ctx = cls; - struct PostgresClosure *pg = ctx->pg; struct TALER_EXCHANGEDB_TableData td = { .table = TALER_EXCHANGEDB_RT_WIRE_TARGETS }; @@ -216,8 +215,6 @@ lrbt_cb_table_reserves (void *cls, &td.serial), GNUNET_PQ_result_spec_auto_from_type ("reserve_pub", &td.details.reserves.reserve_pub), - GNUNET_PQ_result_spec_string ("account_details", - &td.details.reserves.account_details), TALER_PQ_RESULT_SPEC_AMOUNT ("current_balance", &td.details.reserves.current_balance), TALER_PQ_result_spec_absolute_time ("expiration_date", @@ -270,12 +267,11 @@ lrbt_cb_table_reserves_in (void *cls, &td.details.reserves_in.wire_reference), TALER_PQ_RESULT_SPEC_AMOUNT ("credit", &td.details.reserves_in.credit), - GNUNET_PQ_result_spec_string ("sender_account_details", - &td.details.reserves_in. - sender_account_details), - GNUNET_PQ_result_spec_string ("exchange_account_section", - &td.details.reserves_in. - exchange_account_section), + GNUNET_PQ_result_spec_uint64 ("sender_account", + &td.details.reserves_in.sender_account), + GNUNET_PQ_result_spec_string ( + "exchange_account_section", + &td.details.reserves_in.exchange_account_section), TALER_PQ_result_spec_absolute_time ("execution_date", &td.details.reserves_in.execution_date), GNUNET_PQ_result_spec_uint64 ("reserve_uuid", @@ -322,21 +318,20 @@ lrbt_cb_table_reserves_close (void *cls, struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("serial", &td.serial), + GNUNET_PQ_result_spec_uint64 ("reserve_uuid", + &td.details.reserves_close.reserve_uuid), TALER_PQ_result_spec_absolute_time ( "execution_date", &td.details.reserves_close.execution_date), GNUNET_PQ_result_spec_auto_from_type ("wtid", &td.details.reserves_close.wtid), - GNUNET_PQ_result_spec_string ( - "receiver_account", - &td.details.reserves_close.receiver_account), + GNUNET_PQ_result_spec_uint64 ( + "wire_target_serial_id", + &td.details.reserves_close.wire_target_serial_id), TALER_PQ_RESULT_SPEC_AMOUNT ("amount", &td.details.reserves_close.amount), TALER_PQ_RESULT_SPEC_AMOUNT ("closing_fee", &td.details.reserves_close.closing_fee), - GNUNET_PQ_result_spec_uint64 ("reserve_uuid", - &td.details.reserves_close.reserve_uuid), - GNUNET_PQ_result_spec_end }; @@ -377,25 +372,30 @@ lrbt_cb_table_reserves_out (void *cls, for (unsigned int i = 0; i<num_results; i++) { struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_uint64 ("serial", - &td.serial), - GNUNET_PQ_result_spec_auto_from_type ("h_blind_ev", - &td.details.reserves_out.h_blind_ev), + GNUNET_PQ_result_spec_uint64 ( + "serial", + &td.serial), + GNUNET_PQ_result_spec_auto_from_type ( + "h_blind_ev", + &td.details.reserves_out.h_blind_ev), + GNUNET_PQ_result_spec_uint64 ( + "denominations_serial", + &td.details.reserves_out.denominations_serial), TALER_PQ_result_spec_denom_sig ( "denom_sig", &td.details.reserves_out.denom_sig), - GNUNET_PQ_result_spec_auto_from_type ("reserve_sig", - &td.details.reserves_out.reserve_sig), + GNUNET_PQ_result_spec_uint64 ( + "reserve_uuid", + &td.details.reserves_out.reserve_uuid), + GNUNET_PQ_result_spec_auto_from_type ( + "reserve_sig", + &td.details.reserves_out.reserve_sig), TALER_PQ_result_spec_absolute_time ( "execution_date", &td.details.reserves_out.execution_date), - TALER_PQ_RESULT_SPEC_AMOUNT ("amount_with_fee", - &td.details.reserves_out.amount_with_fee), - GNUNET_PQ_result_spec_uint64 ("reserve_uuid", - &td.details.reserves_out.reserve_uuid), - GNUNET_PQ_result_spec_uint64 ("denominations_serial", - &td.details.reserves_out. - denominations_serial), + TALER_PQ_RESULT_SPEC_AMOUNT ( + "amount_with_fee", + &td.details.reserves_out.amount_with_fee), GNUNET_PQ_result_spec_end }; @@ -883,6 +883,9 @@ lrbt_cb_table_deposits (void *cls, GNUNET_PQ_result_spec_uint64 ( "shard", &td.details.deposits.shard), + GNUNET_PQ_result_spec_uint64 ( + "known_coin_id", + &td.details.deposits.known_coin_id), TALER_PQ_RESULT_SPEC_AMOUNT ( "amount_with_fee", &td.details.deposits.amount_with_fee), @@ -907,24 +910,24 @@ lrbt_cb_table_deposits (void *cls, GNUNET_PQ_result_spec_auto_from_type ( "coin_sig", &td.details.deposits.coin_sig), + GNUNET_PQ_result_spec_auto_from_type ( + "wire_salt", + &td.details.deposits.wire_salt), GNUNET_PQ_result_spec_uint64 ( "wire_target_serial_id", &td.details.deposits.wire_target_serial_id), - GNUNET_PQ_result_spec_json ( - "extension_options", - &td.details.deposits.extension_options), - GNUNET_PQ_result_spec_auto_from_type ( - "extension_blocked", - &td.details.deposits.extension_blocked), GNUNET_PQ_result_spec_auto_from_type ( "tiny", &td.details.deposits.tiny), GNUNET_PQ_result_spec_auto_from_type ( "done", &td.details.deposits.done), - GNUNET_PQ_result_spec_uint64 ( - "known_coin_id", - &td.details.deposits.known_coin_id), + GNUNET_PQ_result_spec_auto_from_type ( + "extension_blocked", + &td.details.deposits.extension_blocked), + TALER_PQ_result_spec_json ( + "extension_options", + &td.details.deposits.extension_options), GNUNET_PQ_result_spec_end }; @@ -1019,17 +1022,21 @@ lrbt_cb_table_wire_out (void *cls, struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("serial", &td.serial), - TALER_PQ_result_spec_absolute_time ("execution_date", - &td.details.wire_out.execution_date), - GNUNET_PQ_result_spec_auto_from_type ("wtid_raw", - &td.details.wire_out.wtid_raw), - TALER_PQ_result_spec_json ("wire_target", - &td.details.wire_out.wire_target), + TALER_PQ_result_spec_absolute_time ( + "execution_date", + &td.details.wire_out.execution_date), + GNUNET_PQ_result_spec_auto_from_type ( + "wtid_raw", + &td.details.wire_out.wtid_raw), + GNUNET_PQ_result_spec_uint64 ( + "wire_target_serial_id", + &td.details.wire_out.wire_target_serial_id), GNUNET_PQ_result_spec_string ( "exchange_account_section", &td.details.wire_out.exchange_account_section), - TALER_PQ_RESULT_SPEC_AMOUNT ("amount", - &td.details.wire_out.amount), + TALER_PQ_RESULT_SPEC_AMOUNT ( + "amount", + &td.details.wire_out.amount), GNUNET_PQ_result_spec_end }; |