summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_insert_deposit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-08 21:24:10 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-08 21:24:10 +0200
commit92ac6dd11a35f3c484a54ecb47ef3ca66cf30d0f (patch)
tree8053e3afe268f0c6998b4be135273a89feb5a66f /src/testing/testing_api_cmd_insert_deposit.c
parent8a1402a5d56907a01ca64a6f7a3a82c5591d8007 (diff)
downloadexchange-92ac6dd11a35f3c484a54ecb47ef3ca66cf30d0f.tar.gz
exchange-92ac6dd11a35f3c484a54ecb47ef3ca66cf30d0f.tar.bz2
exchange-92ac6dd11a35f3c484a54ecb47ef3ca66cf30d0f.zip
implement new behavior in exchange httpd and libtalerexchange (for #6416)
Diffstat (limited to 'src/testing/testing_api_cmd_insert_deposit.c')
-rw-r--r--src/testing/testing_api_cmd_insert_deposit.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c
index cff2884a..06f2dbe0 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);
}