2018-11-17 15:15:51 +01:00
|
|
|
/*
|
|
|
|
This file is part of TALER
|
2021-10-27 18:37:42 +02:00
|
|
|
Copyright (C) 2018, 2021 Taler Systems SA
|
2018-11-17 15:15:51 +01:00
|
|
|
|
|
|
|
TALER is free software; you can redistribute it and/or modify it
|
|
|
|
under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3, or (at your
|
|
|
|
option) any later version.
|
|
|
|
|
|
|
|
TALER is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public
|
|
|
|
License along with TALER; see the file COPYING. If not, see
|
|
|
|
<http://www.gnu.org/licenses/>
|
|
|
|
*/
|
|
|
|
/**
|
2020-01-19 15:23:19 +01:00
|
|
|
* @file testing/testing_api_cmd_auditor_deposit_confirmation.c
|
2018-11-17 15:15:51 +01:00
|
|
|
* @brief command for testing /deposit_confirmation.
|
|
|
|
* @author Christian Grothoff
|
|
|
|
*/
|
|
|
|
#include "platform.h"
|
|
|
|
#include "taler_json_lib.h"
|
|
|
|
#include <gnunet/gnunet_curl_lib.h>
|
|
|
|
#include "taler_auditor_service.h"
|
|
|
|
#include "taler_testing_lib.h"
|
|
|
|
#include "taler_signatures.h"
|
|
|
|
#include "backoff.h"
|
|
|
|
|
2020-03-20 02:36:50 +01:00
|
|
|
/**
|
|
|
|
* How long do we wait AT MOST when retrying?
|
|
|
|
*/
|
|
|
|
#define MAX_BACKOFF GNUNET_TIME_relative_multiply ( \
|
|
|
|
GNUNET_TIME_UNIT_MILLISECONDS, 100)
|
|
|
|
|
2020-03-19 19:33:20 +01:00
|
|
|
/**
|
|
|
|
* How often do we retry before giving up?
|
|
|
|
*/
|
|
|
|
#define NUM_RETRIES 5
|
|
|
|
|
2018-11-17 15:15:51 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* State for a "deposit confirmation" CMD.
|
|
|
|
*/
|
|
|
|
struct DepositConfirmationState
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reference to any command that is able to provide a deposit.
|
|
|
|
*/
|
|
|
|
const char *deposit_reference;
|
|
|
|
|
2018-11-17 19:23:39 +01:00
|
|
|
/**
|
|
|
|
* What is the deposited amount without the fee (i.e. the
|
|
|
|
* amount we expect in the deposit confirmation)?
|
|
|
|
*/
|
|
|
|
const char *amount_without_fee;
|
|
|
|
|
2018-11-17 15:15:51 +01:00
|
|
|
/**
|
|
|
|
* Which coin of the @e deposit_reference should we confirm.
|
|
|
|
*/
|
|
|
|
unsigned int coin_index;
|
2018-11-17 19:23:39 +01:00
|
|
|
|
2018-11-17 15:15:51 +01:00
|
|
|
/**
|
|
|
|
* DepositConfirmation handle while operation is running.
|
|
|
|
*/
|
|
|
|
struct TALER_AUDITOR_DepositConfirmationHandle *dc;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Auditor connection.
|
|
|
|
*/
|
|
|
|
struct TALER_AUDITOR_Handle *auditor;
|
2018-11-17 19:23:39 +01:00
|
|
|
|
2018-11-17 15:15:51 +01:00
|
|
|
/**
|
|
|
|
* Interpreter state.
|
|
|
|
*/
|
|
|
|
struct TALER_TESTING_Interpreter *is;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Task scheduled to try later.
|
|
|
|
*/
|
|
|
|
struct GNUNET_SCHEDULER_Task *retry_task;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* How long do we wait until we retry?
|
|
|
|
*/
|
|
|
|
struct GNUNET_TIME_Relative backoff;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Expected HTTP response code.
|
|
|
|
*/
|
|
|
|
unsigned int expected_response_code;
|
|
|
|
|
|
|
|
/**
|
2020-03-19 19:33:20 +01:00
|
|
|
* How often should we retry on (transient) failures?
|
2018-11-17 15:15:51 +01:00
|
|
|
*/
|
2020-03-19 19:33:20 +01:00
|
|
|
unsigned int do_retry;
|
2018-11-17 15:15:51 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the command.
|
|
|
|
*
|
|
|
|
* @param cls closure.
|
|
|
|
* @param cmd the command to execute.
|
|
|
|
* @param is the interpreter state.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
deposit_confirmation_run (void *cls,
|
2019-07-28 15:39:28 +02:00
|
|
|
const struct TALER_TESTING_Command *cmd,
|
|
|
|
struct TALER_TESTING_Interpreter *is);
|
2018-11-17 15:15:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Task scheduled to re-try #deposit_confirmation_run.
|
|
|
|
*
|
|
|
|
* @param cls a `struct DepositConfirmationState`
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
do_retry (void *cls)
|
|
|
|
{
|
|
|
|
struct DepositConfirmationState *dcs = cls;
|
|
|
|
|
|
|
|
dcs->retry_task = NULL;
|
2020-03-20 18:38:57 +01:00
|
|
|
dcs->is->commands[dcs->is->ip].last_req_time
|
|
|
|
= GNUNET_TIME_absolute_get ();
|
2018-11-17 15:15:51 +01:00
|
|
|
deposit_confirmation_run (dcs,
|
2019-08-25 16:18:24 +02:00
|
|
|
NULL,
|
|
|
|
dcs->is);
|
2018-11-17 15:15:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback to analyze the /deposit-confirmation response, just used
|
|
|
|
* to check if the response code is acceptable.
|
|
|
|
*
|
|
|
|
* @param cls closure.
|
2020-04-05 22:05:38 +02:00
|
|
|
* @param hr HTTP response details
|
2018-11-17 15:15:51 +01:00
|
|
|
*/
|
|
|
|
static void
|
|
|
|
deposit_confirmation_cb (void *cls,
|
2020-04-05 22:05:38 +02:00
|
|
|
const struct TALER_AUDITOR_HttpResponse *hr)
|
2018-11-17 15:15:51 +01:00
|
|
|
{
|
|
|
|
struct DepositConfirmationState *dcs = cls;
|
|
|
|
|
|
|
|
dcs->dc = NULL;
|
2020-04-05 22:05:38 +02:00
|
|
|
if (dcs->expected_response_code != hr->http_status)
|
2019-08-25 16:18:24 +02:00
|
|
|
{
|
2020-03-19 19:33:20 +01:00
|
|
|
if (0 != dcs->do_retry)
|
2018-11-17 15:15:51 +01:00
|
|
|
{
|
2020-03-19 19:33:20 +01:00
|
|
|
dcs->do_retry--;
|
2020-04-05 22:05:38 +02:00
|
|
|
if ( (0 == hr->http_status) ||
|
2020-11-07 18:51:14 +01:00
|
|
|
(TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
|
2020-04-05 22:05:38 +02:00
|
|
|
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
|
2018-11-17 15:15:51 +01:00
|
|
|
{
|
|
|
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
|
|
|
"Retrying deposit confirmation failed with %u/%d\n",
|
2020-04-05 22:05:38 +02:00
|
|
|
hr->http_status,
|
|
|
|
(int) hr->ec);
|
2019-07-28 15:39:28 +02:00
|
|
|
/* on DB conflicts, do not use backoff */
|
2020-11-07 18:51:14 +01:00
|
|
|
if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
|
2019-07-28 15:39:28 +02:00
|
|
|
dcs->backoff = GNUNET_TIME_UNIT_ZERO;
|
|
|
|
else
|
2020-03-20 02:36:50 +01:00
|
|
|
dcs->backoff = GNUNET_TIME_randomized_backoff (dcs->backoff,
|
|
|
|
MAX_BACKOFF);
|
2020-03-20 18:38:57 +01:00
|
|
|
dcs->is->commands[dcs->is->ip].num_tries++;
|
2019-07-28 15:39:28 +02:00
|
|
|
dcs->retry_task = GNUNET_SCHEDULER_add_delayed (dcs->backoff,
|
|
|
|
&do_retry,
|
|
|
|
dcs);
|
2018-11-17 15:15:51 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
|
|
|
"Unexpected response code %u to command %s in %s:%u\n",
|
2020-04-05 22:05:38 +02:00
|
|
|
hr->http_status,
|
2018-11-17 15:15:51 +01:00
|
|
|
dcs->is->commands[dcs->is->ip].label,
|
|
|
|
__FILE__,
|
|
|
|
__LINE__);
|
2020-04-05 22:05:38 +02:00
|
|
|
json_dumpf (hr->reply, stderr, 0);
|
2018-11-17 15:15:51 +01:00
|
|
|
TALER_TESTING_interpreter_fail (dcs->is);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
TALER_TESTING_interpreter_next (dcs->is);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the command.
|
|
|
|
*
|
|
|
|
* @param cls closure.
|
|
|
|
* @param cmd the command to execute.
|
|
|
|
* @param is the interpreter state.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
deposit_confirmation_run (void *cls,
|
2019-07-28 15:39:28 +02:00
|
|
|
const struct TALER_TESTING_Command *cmd,
|
|
|
|
struct TALER_TESTING_Interpreter *is)
|
2018-11-17 15:15:51 +01:00
|
|
|
{
|
|
|
|
struct DepositConfirmationState *dcs = cls;
|
|
|
|
const struct TALER_TESTING_Command *deposit_cmd;
|
2021-10-27 18:37:42 +02:00
|
|
|
struct TALER_MerchantWireHash h_wire;
|
|
|
|
struct TALER_PrivateContractHash h_contract_terms;
|
2020-05-07 20:22:02 +02:00
|
|
|
const struct GNUNET_TIME_Absolute *exchange_timestamp = NULL;
|
2018-11-17 15:15:51 +01:00
|
|
|
struct GNUNET_TIME_Absolute timestamp;
|
2021-11-06 19:43:47 +01:00
|
|
|
const struct GNUNET_TIME_Absolute *wire_deadline;
|
2018-11-17 15:15:51 +01:00
|
|
|
struct GNUNET_TIME_Absolute refund_deadline;
|
2018-11-17 19:23:39 +01:00
|
|
|
struct TALER_Amount amount_without_fee;
|
2018-11-17 16:11:47 +01:00
|
|
|
struct TALER_CoinSpendPublicKeyP coin_pub;
|
2020-01-17 17:46:13 +01:00
|
|
|
const struct TALER_MerchantPrivateKeyP *merchant_priv;
|
2018-11-17 19:23:39 +01:00
|
|
|
struct TALER_MerchantPublicKeyP merchant_pub;
|
2018-11-17 15:15:51 +01:00
|
|
|
const struct TALER_ExchangePublicKeyP *exchange_pub;
|
|
|
|
const struct TALER_ExchangeSignatureP *exchange_sig;
|
|
|
|
const json_t *wire_details;
|
|
|
|
const json_t *contract_terms;
|
2018-11-17 16:11:47 +01:00
|
|
|
const struct TALER_CoinSpendPrivateKeyP *coin_priv;
|
|
|
|
const struct TALER_EXCHANGE_Keys *keys;
|
|
|
|
const struct TALER_EXCHANGE_SigningPublicKey *spk;
|
2018-11-17 19:23:39 +01:00
|
|
|
|
2020-03-27 14:05:59 +01:00
|
|
|
(void) cmd;
|
2018-11-17 15:15:51 +01:00
|
|
|
dcs->is = is;
|
|
|
|
GNUNET_assert (NULL != dcs->deposit_reference);
|
|
|
|
deposit_cmd
|
|
|
|
= TALER_TESTING_interpreter_lookup_command (is,
|
2019-07-28 15:39:28 +02:00
|
|
|
dcs->deposit_reference);
|
2018-11-17 15:15:51 +01:00
|
|
|
if (NULL == deposit_cmd)
|
|
|
|
{
|
|
|
|
GNUNET_break (0);
|
|
|
|
TALER_TESTING_interpreter_fail (is);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2019-08-25 16:18:24 +02:00
|
|
|
TALER_TESTING_get_trait_exchange_pub (deposit_cmd,
|
|
|
|
dcs->coin_index,
|
|
|
|
&exchange_pub));
|
2018-11-17 15:15:51 +01:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2019-08-25 16:18:24 +02:00
|
|
|
TALER_TESTING_get_trait_exchange_sig (deposit_cmd,
|
|
|
|
dcs->coin_index,
|
|
|
|
&exchange_sig));
|
2020-05-07 20:22:02 +02:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
|
|
|
TALER_TESTING_get_trait_absolute_time (deposit_cmd,
|
|
|
|
dcs->coin_index,
|
|
|
|
&exchange_timestamp));
|
2021-11-06 19:43:47 +01:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
|
|
|
TALER_TESTING_get_trait_wire_deadline (deposit_cmd,
|
|
|
|
dcs->coin_index,
|
|
|
|
&wire_deadline));
|
2020-05-07 20:22:02 +02:00
|
|
|
GNUNET_assert (NULL != exchange_timestamp);
|
2018-11-17 16:11:47 +01:00
|
|
|
keys = TALER_EXCHANGE_get_keys (dcs->is->exchange);
|
|
|
|
GNUNET_assert (NULL != keys);
|
2020-02-27 23:46:53 +01:00
|
|
|
spk = TALER_EXCHANGE_get_signing_key_info (keys,
|
|
|
|
exchange_pub);
|
2018-11-17 19:23:39 +01:00
|
|
|
|
2018-11-17 15:15:51 +01:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2019-08-25 16:18:24 +02:00
|
|
|
TALER_TESTING_get_trait_contract_terms (deposit_cmd,
|
|
|
|
&contract_terms));
|
2018-11-17 19:23:39 +01:00
|
|
|
/* Very unlikely to fail */
|
|
|
|
GNUNET_assert (NULL != contract_terms);
|
2019-06-03 00:42:32 +02:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2020-07-16 00:42:42 +02:00
|
|
|
TALER_JSON_contract_hash (contract_terms,
|
|
|
|
&h_contract_terms));
|
2018-11-17 15:15:51 +01:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2019-07-28 15:39:28 +02:00
|
|
|
TALER_TESTING_get_trait_wire_details (deposit_cmd,
|
|
|
|
&wire_details));
|
2019-06-03 00:42:32 +02:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2019-07-28 15:39:28 +02:00
|
|
|
TALER_JSON_merchant_wire_signature_hash (wire_details,
|
|
|
|
&h_wire));
|
2018-11-17 15:15:51 +01:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2019-07-28 15:39:28 +02:00
|
|
|
TALER_TESTING_get_trait_coin_priv (deposit_cmd,
|
|
|
|
dcs->coin_index,
|
|
|
|
&coin_priv));
|
2018-11-17 16:11:47 +01:00
|
|
|
GNUNET_CRYPTO_eddsa_key_get_public (&coin_priv->eddsa_priv,
|
|
|
|
&coin_pub.eddsa_pub);
|
2018-11-17 19:23:39 +01:00
|
|
|
GNUNET_assert (GNUNET_OK ==
|
2020-01-17 17:46:13 +01:00
|
|
|
TALER_TESTING_get_trait_merchant_priv (deposit_cmd,
|
|
|
|
&merchant_priv));
|
|
|
|
GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv->eddsa_priv,
|
2018-11-17 19:23:39 +01:00
|
|
|
&merchant_pub.eddsa_pub);
|
|
|
|
GNUNET_assert (GNUNET_OK ==
|
|
|
|
TALER_string_to_amount (dcs->amount_without_fee,
|
|
|
|
&amount_without_fee));
|
2019-07-28 15:39:28 +02:00
|
|
|
/* timestamp is mandatory */
|
2019-06-18 13:20:43 +02:00
|
|
|
{
|
|
|
|
struct GNUNET_JSON_Specification spec[] = {
|
2020-07-05 21:54:11 +02:00
|
|
|
TALER_JSON_spec_absolute_time ("timestamp", ×tamp),
|
2019-08-25 16:18:24 +02:00
|
|
|
GNUNET_JSON_spec_end ()
|
2019-06-18 13:20:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
if (GNUNET_OK !=
|
|
|
|
GNUNET_JSON_parse (contract_terms,
|
|
|
|
spec,
|
|
|
|
NULL, NULL))
|
|
|
|
{
|
|
|
|
GNUNET_break (0);
|
|
|
|
TALER_TESTING_interpreter_fail (is);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2019-07-28 15:39:28 +02:00
|
|
|
/* refund deadline is optional, defaults to zero */
|
|
|
|
{
|
|
|
|
struct GNUNET_JSON_Specification spec[] = {
|
2021-11-06 19:43:47 +01:00
|
|
|
TALER_JSON_spec_absolute_time ("refund_deadline",
|
|
|
|
&refund_deadline),
|
2019-08-25 16:18:24 +02:00
|
|
|
GNUNET_JSON_spec_end ()
|
2019-07-28 15:39:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
if (GNUNET_OK !=
|
|
|
|
GNUNET_JSON_parse (contract_terms,
|
|
|
|
spec,
|
|
|
|
NULL, NULL))
|
|
|
|
{
|
|
|
|
refund_deadline = timestamp;
|
|
|
|
}
|
|
|
|
}
|
2020-04-05 22:05:38 +02:00
|
|
|
dcs->dc = TALER_AUDITOR_deposit_confirmation (dcs->auditor,
|
|
|
|
&h_wire,
|
|
|
|
&h_contract_terms,
|
2020-05-07 20:22:02 +02:00
|
|
|
*exchange_timestamp,
|
2021-11-06 19:43:47 +01:00
|
|
|
*wire_deadline,
|
2020-04-05 22:05:38 +02:00
|
|
|
refund_deadline,
|
|
|
|
&amount_without_fee,
|
|
|
|
&coin_pub,
|
|
|
|
&merchant_pub,
|
|
|
|
exchange_pub,
|
|
|
|
exchange_sig,
|
|
|
|
&keys->master_pub,
|
|
|
|
spk->valid_from,
|
|
|
|
spk->valid_until,
|
|
|
|
spk->valid_legal,
|
|
|
|
&spk->master_sig,
|
|
|
|
&deposit_confirmation_cb,
|
|
|
|
dcs);
|
2018-11-17 15:15:51 +01:00
|
|
|
|
|
|
|
if (NULL == dcs->dc)
|
|
|
|
{
|
|
|
|
GNUNET_break (0);
|
|
|
|
TALER_TESTING_interpreter_fail (is);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Free the state of a "deposit_confirmation" CMD, and possibly cancel a
|
|
|
|
* pending operation thereof.
|
|
|
|
*
|
|
|
|
* @param cls closure, a `struct DepositConfirmationState`
|
|
|
|
* @param cmd the command which is being cleaned up.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
deposit_confirmation_cleanup (void *cls,
|
2019-07-28 15:39:28 +02:00
|
|
|
const struct TALER_TESTING_Command *cmd)
|
2018-11-17 15:15:51 +01:00
|
|
|
{
|
|
|
|
struct DepositConfirmationState *dcs = cls;
|
|
|
|
|
|
|
|
if (NULL != dcs->dc)
|
|
|
|
{
|
|
|
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
|
|
|
"Command %u (%s) did not complete\n",
|
|
|
|
dcs->is->ip,
|
|
|
|
cmd->label);
|
|
|
|
TALER_AUDITOR_deposit_confirmation_cancel (dcs->dc);
|
|
|
|
dcs->dc = NULL;
|
|
|
|
}
|
|
|
|
if (NULL != dcs->retry_task)
|
|
|
|
{
|
|
|
|
GNUNET_SCHEDULER_cancel (dcs->retry_task);
|
|
|
|
dcs->retry_task = NULL;
|
|
|
|
}
|
|
|
|
GNUNET_free (dcs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct TALER_TESTING_Command
|
2020-01-18 13:57:47 +01:00
|
|
|
TALER_TESTING_cmd_deposit_confirmation (const char *label,
|
|
|
|
struct TALER_AUDITOR_Handle *auditor,
|
|
|
|
const char *deposit_reference,
|
|
|
|
unsigned int coin_index,
|
|
|
|
const char *amount_without_fee,
|
|
|
|
unsigned int expected_response_code)
|
2018-11-17 15:15:51 +01:00
|
|
|
{
|
|
|
|
struct DepositConfirmationState *dcs;
|
|
|
|
|
|
|
|
dcs = GNUNET_new (struct DepositConfirmationState);
|
|
|
|
dcs->auditor = auditor;
|
|
|
|
dcs->deposit_reference = deposit_reference;
|
|
|
|
dcs->coin_index = coin_index;
|
2018-11-17 19:23:39 +01:00
|
|
|
dcs->amount_without_fee = amount_without_fee;
|
2018-11-17 15:15:51 +01:00
|
|
|
dcs->expected_response_code = expected_response_code;
|
|
|
|
|
2020-01-18 13:57:47 +01:00
|
|
|
{
|
|
|
|
struct TALER_TESTING_Command cmd = {
|
|
|
|
.cls = dcs,
|
|
|
|
.label = label,
|
|
|
|
.run = &deposit_confirmation_run,
|
2021-10-27 18:37:42 +02:00
|
|
|
.cleanup = &deposit_confirmation_cleanup
|
2020-01-18 13:57:47 +01:00
|
|
|
};
|
2018-11-17 19:23:39 +01:00
|
|
|
|
2020-01-18 13:57:47 +01:00
|
|
|
return cmd;
|
|
|
|
}
|
2018-11-17 15:15:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct TALER_TESTING_Command
|
2020-03-20 18:38:57 +01:00
|
|
|
TALER_TESTING_cmd_deposit_confirmation_with_retry (
|
|
|
|
struct TALER_TESTING_Command cmd)
|
2018-11-17 15:15:51 +01:00
|
|
|
{
|
|
|
|
struct DepositConfirmationState *dcs;
|
|
|
|
|
|
|
|
GNUNET_assert (&deposit_confirmation_run == cmd.run);
|
|
|
|
dcs = cmd.cls;
|
2020-03-19 19:33:20 +01:00
|
|
|
dcs->do_retry = NUM_RETRIES;
|
2018-11-17 15:15:51 +01:00
|
|
|
return cmd;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* end of testing_auditor_api_cmd_deposit_confirmation.c */
|