merging Florian's changes with my wire changes

This commit is contained in:
Christian Grothoff 2018-04-15 12:20:00 +02:00
commit 202827ebda
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
12 changed files with 50 additions and 18 deletions

View File

@ -1,3 +1,6 @@
Tue Apr 3 23:29:06 CEST 2018
Releasing Taler v0.5.0
Thu Jan 4 11:55:41 CET 2018 Thu Jan 4 11:55:41 CET 2018
Fix issue #5234 (aggregator ignoring refunds). Fix issue #5234 (aggregator ignoring refunds).
Misc. minor fixes to the auditor. -CG Misc. minor fixes to the auditor. -CG

View File

@ -17,7 +17,7 @@
# #
# #
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([taler-exchange], [0.4.0], [taler-bug@gnunet.org]) AC_INIT([taler-exchange], [0.5.0], [taler-bug@gnunet.org])
AC_CONFIG_SRCDIR([src/util/util.c]) AC_CONFIG_SRCDIR([src/util/util.c])
AC_CONFIG_HEADERS([taler_config.h]) AC_CONFIG_HEADERS([taler_config.h])
# support for non-recursive builds # support for non-recursive builds

View File

@ -158,7 +158,7 @@ parse_account_history (struct TALER_BANK_HistoryHandle *hh,
/** /**
* Function called when we're done processing the * Function called when we're done processing the
* HTTP /admin/add/incoming request. * HTTP /history request.
* *
* @param cls the `struct TALER_BANK_HistoryHandle` * @param cls the `struct TALER_BANK_HistoryHandle`
* @param response_code HTTP response code, 0 on error * @param response_code HTTP response code, 0 on error

View File

@ -123,7 +123,8 @@ test_cancelled (struct TALER_TESTING_Interpreter *is,
const struct TALER_TESTING_Command *c = &is->commands[i]; const struct TALER_TESTING_Command *c = &is->commands[i];
#warning "Errors reported here are NOT fatal" /* XXX: Errors reported here are NOT fatal */
/* Rejected wire transfers have hold a reference to a /* Rejected wire transfers have hold a reference to a
* reject command to mark them as rejected. So errors * reject command to mark them as rejected. So errors
* about "reject traits" not found are NOT fatal here */ * about "reject traits" not found are NOT fatal here */

View File

@ -867,7 +867,7 @@ keys_completed_cb (void *cls,
{ {
/* offsets will map 1:1 */ /* offsets will map 1:1 */
unsigned int off = aold->denom_keys[j] - kd_old.denom_keys; unsigned int off = aold->denom_keys[j] - kd_old.denom_keys;
/* FIXME(#5315): this should not be an assert! */
GNUNET_assert (off < kd_old.num_denom_keys); GNUNET_assert (off < kd_old.num_denom_keys);
anew->denom_keys[j] = &kd.denom_keys[off]; anew->denom_keys[j] = &kd.denom_keys[off];
} }
@ -1127,7 +1127,7 @@ request_keys (struct TALER_EXCHANGE_Handle *exchange)
GNUNET_assert (NULL == exchange->kr); GNUNET_assert (NULL == exchange->kr);
kr = GNUNET_new (struct KeysRequest); kr = GNUNET_new (struct KeysRequest);
kr->exchange = exchange; kr->exchange = exchange;
if (GNUNET_YES == MAH_handle_is_ready (exchange)) if (GNUNET_YES == MAH_handle_is_ready (exchange) && !TALER_EXCHANGE_API_DISABLE_CHERRYPICKING)
{ {
char *arg; char *arg;

View File

@ -579,7 +579,11 @@ run (void *cls)
/* Re-download and check /keys */ /* Re-download and check /keys */
{ .oc = OC_CHECK_KEYS, { .oc = OC_CHECK_KEYS,
.details.check_keys.generation = 2, .details.check_keys.generation = 2,
#if TALER_EXCHANGE_API_DISABLE_CHERRYPICKING
.details.check_keys.num_denom_keys = 12
#else
.details.check_keys.num_denom_keys = 8 .details.check_keys.num_denom_keys = 8
#endif
}, },
{ .oc = OC_END } { .oc = OC_END }
}; };

View File

@ -84,7 +84,12 @@ run (void *cls,
SIGUSR1), SIGUSR1),
TALER_TESTING_cmd_check_keys ("check-keys-2", TALER_TESTING_cmd_check_keys ("check-keys-2",
2, 8, 2,
#if TALER_EXCHANGE_API_DISABLE_CHERRYPICKING
12,
#else
8,
#endif
is->exchange), is->exchange),

View File

@ -518,16 +518,15 @@ track_transfer_cb
return; return;
} }
switch (http_status) if ( (NULL == tts->expected_total_amount) ||
{ (NULL == tts->expected_wire_fee) )
if (
(NULL == tts->expected_total_amount) ||
(NULL == tts->expected_wire_fee))
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Expected amount and fee not specified, " "Expected amount and fee not specified, "
"likely to segfault...\n"); "likely to segfault...\n");
switch (http_status)
{
case MHD_HTTP_OK: case MHD_HTTP_OK:
if (GNUNET_OK != if (GNUNET_OK !=
TALER_string_to_amount (tts->expected_total_amount, TALER_string_to_amount (tts->expected_total_amount,

View File

@ -328,10 +328,10 @@ reject_cb (void *cls,
rt = NULL; rt = NULL;
if (TALER_EC_NONE != ec) if (TALER_EC_NONE != ec)
{ {
fprintf (stderr, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to wire back transfer `%s': %d\n", "Failed to wire back transfer `%s': %d\n",
rtc->wtid_s, rtc->wtid_s,
ec); ec);
GNUNET_free (rtc->wtid_s); GNUNET_free (rtc->wtid_s);
db_plugin->rollback (db_plugin->cls, db_plugin->rollback (db_plugin->cls,
rtc->session); rtc->session);
@ -389,10 +389,13 @@ history_cb (void *cls,
"End of list. Committing progress!\n"); "End of list. Committing progress!\n");
qs = db_plugin->commit (db_plugin->cls, qs = db_plugin->commit (db_plugin->cls,
session); session);
GNUNET_break (0 <= qs);
if ( (GNUNET_YES == delay) && if ( (GNUNET_YES == delay) &&
(test_mode) && (test_mode) &&
(NULL == wa_pos->next) ) (NULL == wa_pos->next) )
{ {
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Shutdown due to test mode!\n");
GNUNET_SCHEDULER_shutdown (); GNUNET_SCHEDULER_shutdown ();
return GNUNET_OK; return GNUNET_OK;
} }

View File

@ -1953,7 +1953,10 @@ postgres_reserves_in_insert (void *cls,
"reserve_create", "reserve_create",
params); params);
if (0 > qs) if (0 > qs)
{
GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != qs);
return qs; return qs;
}
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{ {
/* Maybe DB did not detect serializiability error already, /* Maybe DB did not detect serializiability error already,
@ -1980,7 +1983,10 @@ postgres_reserves_in_insert (void *cls,
"reserves_in_add_transaction", "reserves_in_add_transaction",
params); params);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs) if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != qs);
return qs; return qs;
}
} }
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == reserve_exists) if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == reserve_exists)
@ -1999,7 +2005,7 @@ postgres_reserves_in_insert (void *cls,
balance)) balance))
{ {
/* currency overflow or incompatible currency */ /* currency overflow or incompatible currency */
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Attempt to deposit incompatible amount into reserve\n"); "Attempt to deposit incompatible amount into reserve\n");
return GNUNET_DB_STATUS_HARD_ERROR; return GNUNET_DB_STATUS_HARD_ERROR;
} }

View File

@ -31,6 +31,13 @@
/* ********************* /keys *********************** */ /* ********************* /keys *********************** */
/**
* Temporarily disable cherrypicking until it's fixed.
* See #5315.
*/
#define TALER_EXCHANGE_API_DISABLE_CHERRYPICKING 1
/** /**
* List of possible options to be passed to * List of possible options to be passed to
* #TALER_EXCHANGE_connect(). * #TALER_EXCHANGE_connect().

View File

@ -905,7 +905,11 @@ bhist_cb (void *cls,
sizeof (bserial_id), sizeof (bserial_id),
&wd)) ) &wd)) )
whh->hres_cb = NULL; whh->hres_cb = NULL;
return; /* do NOT yet clean up! */ GNUNET_break (NULL != whh->hh);
/* Once we get the sentinel element, the handle becomes invalid. */
if (TALER_BANK_DIRECTION_NONE == dir)
whh->hh = NULL;
return;
} }
case MHD_HTTP_NO_CONTENT: case MHD_HTTP_NO_CONTENT:
if (NULL != whh->hres_cb) if (NULL != whh->hres_cb)