aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_batch_deposit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_batch_deposit.c')
-rw-r--r--src/testing/testing_api_cmd_batch_deposit.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c
index ef54e6a03..21d73bf5e 100644
--- a/src/testing/testing_api_cmd_batch_deposit.c
+++ b/src/testing/testing_api_cmd_batch_deposit.c
@@ -75,6 +75,12 @@ struct Coin
const struct TALER_TESTING_Command *coin_cmd;
/**
+ * Expected entry in the coin history created by this
+ * coin.
+ */
+ struct TALER_EXCHANGE_CoinHistoryEntry che;
+
+ /**
* Index of the coin at @e coin_cmd.
*/
unsigned int coin_idx;
@@ -369,6 +375,19 @@ batch_deposit_run (void *cls,
coin_priv,
&cdd->coin_sig);
coin->coin_sig = cdd->coin_sig;
+ coin->che.type = TALER_EXCHANGE_CTT_DEPOSIT;
+ coin->che.amount = coin->amount;
+ coin->che.details.deposit.h_wire = h_wire;
+ coin->che.details.deposit.h_contract_terms = h_contract_terms;
+ coin->che.details.deposit.no_h_policy = true;
+ coin->che.details.deposit.no_wallet_data_hash = true;
+ coin->che.details.deposit.wallet_timestamp = ds->wallet_timestamp;
+ coin->che.details.deposit.merchant_pub = merchant_pub;
+ coin->che.details.deposit.refund_deadline = ds->refund_deadline;
+ coin->che.details.deposit.sig = cdd->coin_sig;
+ coin->che.details.deposit.no_hac = GNUNET_is_zero (&cdd->h_age_commitment);
+ coin->che.details.deposit.hac = cdd->h_age_commitment;
+ coin->che.details.deposit.deposit_fee = denom_pub->fees.deposit;
}
GNUNET_assert (NULL == ds->dh);
@@ -460,6 +479,7 @@ batch_deposit_traits (void *cls,
struct Coin *coin = &ds->coins[index];
/* Will point to coin cmd internals. */
const struct TALER_CoinSpendPrivateKeyP *coin_spent_priv;
+ struct TALER_CoinSpendPublicKeyP coin_spent_pub;
const struct TALER_AgeCommitmentProof *age_commitment_proof;
if (index >= ds->num_coins)
@@ -486,6 +506,10 @@ batch_deposit_traits (void *cls,
TALER_TESTING_interpreter_fail (ds->is);
return GNUNET_NO;
}
+
+ GNUNET_CRYPTO_eddsa_key_get_public (&coin_spent_priv->eddsa_priv,
+ &coin_spent_pub.eddsa_pub);
+
{
struct TALER_TESTING_Trait traits[] = {
/* First two traits are only available if
@@ -500,6 +524,8 @@ batch_deposit_traits (void *cls,
TALER_TESTING_make_trait_merchant_priv (&ds->merchant_priv),
TALER_TESTING_make_trait_age_commitment_proof (index,
age_commitment_proof),
+ TALER_TESTING_make_trait_coin_pub (index,
+ &coin_spent_pub),
TALER_TESTING_make_trait_coin_priv (index,
coin_spent_priv),
TALER_TESTING_make_trait_coin_sig (index,