summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_recoup.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-06 20:04:36 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-06 20:04:36 +0100
commit5ff3189075459aa139739bd7440ed5a29e5e34fe (patch)
tree4f7f249feb1d87492ca8f2d91e634bf05a2fb86f /src/testing/testing_api_cmd_recoup.c
parent62d8368b1b89d8b2259dee4abd1b1970ac385d4a (diff)
downloadexchange-5ff3189075459aa139739bd7440ed5a29e5e34fe.tar.gz
exchange-5ff3189075459aa139739bd7440ed5a29e5e34fe.tar.bz2
exchange-5ff3189075459aa139739bd7440ed5a29e5e34fe.zip
-fix recoup testing cmds
Diffstat (limited to 'src/testing/testing_api_cmd_recoup.c')
-rw-r--r--src/testing/testing_api_cmd_recoup.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/testing/testing_api_cmd_recoup.c b/src/testing/testing_api_cmd_recoup.c
index 7bd477377..da7f00a8e 100644
--- a/src/testing/testing_api_cmd_recoup.c
+++ b/src/testing/testing_api_cmd_recoup.c
@@ -237,12 +237,12 @@ recoup_run (void *cls,
struct RecoupState *ps = cls;
const struct TALER_TESTING_Command *coin_cmd;
const struct TALER_CoinSpendPrivateKeyP *coin_priv;
- const union TALER_DenominationBlindingKeyP *blinding_key;
const struct TALER_EXCHANGE_DenomPublicKey *denom_pub;
const struct TALER_DenominationSignature *coin_sig;
- struct TALER_PlanchetSecretsP planchet;
+ const struct TALER_PlanchetSecretsP *planchet;
char *cref;
unsigned int idx;
+ const struct TALER_ExchangeWithdrawValues *ewv;
ps->is = is;
if (GNUNET_OK !=
@@ -264,7 +264,6 @@ recoup_run (void *cls,
TALER_TESTING_interpreter_fail (is);
return;
}
-
if (GNUNET_OK !=
TALER_TESTING_get_trait_coin_priv (coin_cmd,
idx,
@@ -274,18 +273,24 @@ recoup_run (void *cls,
TALER_TESTING_interpreter_fail (is);
return;
}
-
if (GNUNET_OK !=
- TALER_TESTING_get_trait_blinding_key (coin_cmd,
- idx,
- &blinding_key))
+ TALER_TESTING_get_trait_exchange_wd_value (coin_cmd,
+ idx,
+ &ewv))
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (is);
+ return;
+ }
+ if (GNUNET_OK !=
+ TALER_TESTING_get_trait_planchet_secret (coin_cmd,
+ idx,
+ &planchet))
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (is);
return;
}
- planchet.coin_priv = *coin_priv;
- planchet.blinding_key = *blinding_key;
GNUNET_CRYPTO_eddsa_key_get_public (
&coin_priv->eddsa_priv,
&ps->reserve_history.details.recoup_details.coin_pub.eddsa_pub);
@@ -299,7 +304,6 @@ recoup_run (void *cls,
TALER_TESTING_interpreter_fail (is);
return;
}
-
if (GNUNET_OK !=
TALER_TESTING_get_trait_denom_sig (coin_cmd,
idx,
@@ -309,15 +313,14 @@ recoup_run (void *cls,
TALER_TESTING_interpreter_fail (is);
return;
}
-
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Trying to recoup denomination '%s'\n",
TALER_B2S (&denom_pub->h_key));
-
ps->ph = TALER_EXCHANGE_recoup (is->exchange,
denom_pub,
coin_sig,
- &planchet,
+ ewv,
+ planchet,
&recoup_cb,
ps);
GNUNET_assert (NULL != ps->ph);