diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-10 19:13:49 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-10 19:13:49 +0200 |
commit | 852c46668f1c9f766de9473c50e787e32a0f8697 (patch) | |
tree | 6106427e8da10610507b12cd4d663f3e66d8eae7 /src/testing/testing_api_cmd_age_withdraw.c | |
parent | cf595fa8480e87e1522710cd8ea7db9174aa028b (diff) | |
download | exchange-852c46668f1c9f766de9473c50e787e32a0f8697.tar.xz |
major exchange DB schema change: store common properties of batch deposit in batch_deposits table, and coin-specific ones in coin_deposits table; plus minor cleanups
Diffstat (limited to 'src/testing/testing_api_cmd_age_withdraw.c')
-rw-r--r-- | src/testing/testing_api_cmd_age_withdraw.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/testing/testing_api_cmd_age_withdraw.c b/src/testing/testing_api_cmd_age_withdraw.c index 2a76b3c1b..98d0e0f2e 100644 --- a/src/testing/testing_api_cmd_age_withdraw.c +++ b/src/testing/testing_api_cmd_age_withdraw.c @@ -355,20 +355,23 @@ age_withdraw_cleanup ( aws->handle = NULL; } - for (size_t n = 0; n < aws->num_coins; n++) + if (NULL != aws->coin_inputs) { - struct TALER_EXCHANGE_AgeWithdrawCoinInput *in = &aws->coin_inputs[n]; - struct CoinOutputState *out = &aws->coin_outputs[n]; - - if (NULL != in && NULL != in->denom_pub) + for (size_t n = 0; n < aws->num_coins; n++) { - TALER_EXCHANGE_destroy_denomination_key (in->denom_pub); - in->denom_pub = NULL; + struct TALER_EXCHANGE_AgeWithdrawCoinInput *in = &aws->coin_inputs[n]; + struct CoinOutputState *out = &aws->coin_outputs[n]; + + if (NULL != in && NULL != in->denom_pub) + { + TALER_EXCHANGE_destroy_denomination_key (in->denom_pub); + in->denom_pub = NULL; + } + if (NULL != out) + TALER_age_commitment_proof_free (&out->details.age_commitment_proof); } - if (NULL != out) - TALER_age_commitment_proof_free (&out->details.age_commitment_proof); + GNUNET_free (aws->coin_inputs); } - GNUNET_free (aws->coin_inputs); GNUNET_free (aws->coin_outputs); GNUNET_free (aws->exchange_url); GNUNET_free (aws->reserve_payto_uri); |