check-keys CMD: #5284.
This commit is contained in:
parent
15c1a877c6
commit
bb45ee0e8e
@ -75,8 +75,7 @@ run (void *cls,
|
|||||||
SIGUSR1),
|
SIGUSR1),
|
||||||
TALER_TESTING_cmd_check_keys ("check-keys-1",
|
TALER_TESTING_cmd_check_keys ("check-keys-1",
|
||||||
1,
|
1,
|
||||||
4,
|
4),
|
||||||
is->exchange),
|
|
||||||
/* sleep a bit */
|
/* sleep a bit */
|
||||||
TALER_TESTING_cmd_sleep ("sleep",
|
TALER_TESTING_cmd_sleep ("sleep",
|
||||||
10),
|
10),
|
||||||
@ -90,9 +89,7 @@ run (void *cls,
|
|||||||
SIGUSR1),
|
SIGUSR1),
|
||||||
TALER_TESTING_cmd_check_keys ("check-keys-2",
|
TALER_TESTING_cmd_check_keys ("check-keys-2",
|
||||||
2,
|
2,
|
||||||
6,
|
6),
|
||||||
is->exchange),
|
|
||||||
|
|
||||||
/* sleep a bit */
|
/* sleep a bit */
|
||||||
TALER_TESTING_cmd_sleep ("sleep",
|
TALER_TESTING_cmd_sleep ("sleep",
|
||||||
20),
|
20),
|
||||||
@ -106,8 +103,7 @@ run (void *cls,
|
|||||||
SIGUSR1),
|
SIGUSR1),
|
||||||
TALER_TESTING_cmd_check_keys ("check-keys-3",
|
TALER_TESTING_cmd_check_keys ("check-keys-3",
|
||||||
3,
|
3,
|
||||||
8,
|
8),
|
||||||
is->exchange),
|
|
||||||
TALER_TESTING_cmd_end ()
|
TALER_TESTING_cmd_end ()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -46,12 +46,6 @@ struct CheckKeysState
|
|||||||
* have.
|
* have.
|
||||||
*/
|
*/
|
||||||
unsigned int num_denom_keys;
|
unsigned int num_denom_keys;
|
||||||
|
|
||||||
/**
|
|
||||||
* Connection to the exchange.
|
|
||||||
*/
|
|
||||||
struct TALER_EXCHANGE_Handle *exchange;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -83,7 +77,7 @@ check_keys_run (void *cls,
|
|||||||
|
|
||||||
/* Means re-download /keys. */
|
/* Means re-download /keys. */
|
||||||
GNUNET_break (0 == TALER_EXCHANGE_check_keys_current
|
GNUNET_break (0 == TALER_EXCHANGE_check_keys_current
|
||||||
(cks->exchange, GNUNET_YES).abs_value_us);
|
(is->exchange, GNUNET_YES).abs_value_us);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (is->key_generation > cks->generation)
|
if (is->key_generation > cks->generation)
|
||||||
@ -146,8 +140,7 @@ struct TALER_TESTING_Command
|
|||||||
TALER_TESTING_cmd_check_keys
|
TALER_TESTING_cmd_check_keys
|
||||||
(const char *label,
|
(const char *label,
|
||||||
unsigned int generation,
|
unsigned int generation,
|
||||||
unsigned int num_denom_keys,
|
unsigned int num_denom_keys)
|
||||||
struct TALER_EXCHANGE_Handle *exchange)
|
|
||||||
{
|
{
|
||||||
struct CheckKeysState *cks;
|
struct CheckKeysState *cks;
|
||||||
struct TALER_TESTING_Command cmd;
|
struct TALER_TESTING_Command cmd;
|
||||||
@ -155,7 +148,6 @@ TALER_TESTING_cmd_check_keys
|
|||||||
cks = GNUNET_new (struct CheckKeysState);
|
cks = GNUNET_new (struct CheckKeysState);
|
||||||
cks->generation = generation;
|
cks->generation = generation;
|
||||||
cks->num_denom_keys = num_denom_keys;
|
cks->num_denom_keys = num_denom_keys;
|
||||||
cks->exchange = exchange;
|
|
||||||
cmd.cls = cks;
|
cmd.cls = cks;
|
||||||
cmd.label = label;
|
cmd.label = label;
|
||||||
cmd.run = &check_keys_run;
|
cmd.run = &check_keys_run;
|
||||||
|
@ -1414,7 +1414,6 @@ TALER_TESTING_cmd_sleep (const char *label,
|
|||||||
* @param generation how many /keys responses are expected to
|
* @param generation how many /keys responses are expected to
|
||||||
* have been returned when this CMD will be run.
|
* have been returned when this CMD will be run.
|
||||||
* @param num_denom_keys expected number of denomination keys.
|
* @param num_denom_keys expected number of denomination keys.
|
||||||
* @param exchange connection handle to the exchange to test.
|
|
||||||
*
|
*
|
||||||
* @return the command.
|
* @return the command.
|
||||||
*/
|
*/
|
||||||
@ -1422,8 +1421,7 @@ struct TALER_TESTING_Command
|
|||||||
TALER_TESTING_cmd_check_keys
|
TALER_TESTING_cmd_check_keys
|
||||||
(const char *label,
|
(const char *label,
|
||||||
unsigned int generation,
|
unsigned int generation,
|
||||||
unsigned int num_denom_keys,
|
unsigned int num_denom_keys);
|
||||||
struct TALER_EXCHANGE_Handle *exchange);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user