From 92ac6dd11a35f3c484a54ecb47ef3ca66cf30d0f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 8 Jul 2020 21:24:10 +0200 Subject: implement new behavior in exchange httpd and libtalerexchange (for #6416) --- src/testing/testing_api_cmd_insert_deposit.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/testing/testing_api_cmd_insert_deposit.c') diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c index cff2884aa..06f2dbe0e 100644 --- a/src/testing/testing_api_cmd_insert_deposit.c +++ b/src/testing/testing_api_cmd_insert_deposit.c @@ -175,7 +175,9 @@ insert_deposit_run (void *cls, GNUNET_CRYPTO_rsa_public_key_hash (dpk.rsa_public_key, &deposit.coin.denom_pub_hash); - + GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, + &deposit.coin.coin_pub, + sizeof (deposit.coin.coin_pub)); GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &hc); deposit.coin.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_sign_fdh (denom_priv, @@ -198,10 +200,9 @@ insert_deposit_run (void *cls, deposit.receiver_wire_account, &deposit.h_wire)); deposit.timestamp = GNUNET_TIME_absolute_get (); - GNUNET_TIME_round_abs (&deposit.timestamp); - deposit.wire_deadline = GNUNET_TIME_relative_to_absolute ( - ids->wire_deadline); - GNUNET_TIME_round_abs (&deposit.wire_deadline); + (void) GNUNET_TIME_round_abs (&deposit.timestamp); + deposit.wire_deadline = GNUNET_TIME_relative_to_absolute (ids->wire_deadline); + (void) GNUNET_TIME_round_abs (&deposit.wire_deadline); /* finally, actually perform the DB operation */ if ( (GNUNET_OK != @@ -222,6 +223,8 @@ insert_deposit_run (void *cls, ids->dbc->session)) ) { GNUNET_break (0); + ids->dbc->plugin->rollback (ids->dbc->plugin->cls, + ids->dbc->session); TALER_TESTING_interpreter_fail (is); } -- cgit v1.2.3