diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-08 21:24:10 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-08 21:24:10 +0200 |
commit | 92ac6dd11a35f3c484a54ecb47ef3ca66cf30d0f (patch) | |
tree | 8053e3afe268f0c6998b4be135273a89feb5a66f /src/testing | |
parent | 8a1402a5d56907a01ca64a6f7a3a82c5591d8007 (diff) |
implement new behavior in exchange httpd and libtalerexchange (for #6416)
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing_api_cmd_insert_deposit.c | 13 |
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 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); } |