Testing for the /deposit api call
This commit is contained in:
parent
8cd6fc9b98
commit
f0a1941f39
@ -25,14 +25,14 @@
|
|||||||
#define NB_DENOMINATION_INIT 15
|
#define NB_DENOMINATION_INIT 15
|
||||||
#define NB_DENOMINATION_SAVE 15
|
#define NB_DENOMINATION_SAVE 15
|
||||||
|
|
||||||
#define NB_RESERVE_INIT 10000
|
#define NB_RESERVE_INIT 100
|
||||||
#define NB_RESERVE_SAVE 1000
|
#define NB_RESERVE_SAVE 10
|
||||||
|
|
||||||
#define NB_DEPOSIT_INIT 10000
|
#define NB_DEPOSIT_INIT 100
|
||||||
#define NB_DEPOSIT_SAVE 1000
|
#define NB_DEPOSIT_SAVE 10
|
||||||
|
|
||||||
#define NB_WITHDRAW_INIT 10000
|
#define NB_WITHDRAW_INIT 100
|
||||||
#define NB_WITHDRAW_SAVE 1000
|
#define NB_WITHDRAW_SAVE 10
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the performances tests for the mint database
|
* Runs the performances tests for the mint database
|
||||||
@ -255,6 +255,25 @@ main (int argc, char ** argv)
|
|||||||
"item/sec",
|
"item/sec",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of /withdraw/sign"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of /withdraw/sign"),
|
||||||
|
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("12 - start"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("12 - /deposit",
|
||||||
|
NB_DEPOSIT_SAVE),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("12 - coin",
|
||||||
|
"12 - /deposit",
|
||||||
|
"03 - save coin"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_DEPOSIT ("12 - deposit",
|
||||||
|
"12 - coin"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
|
"12 - /deposit"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("12 - stop"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
|
"12 - start",
|
||||||
|
"12 - stop",
|
||||||
|
"POSTGRES",
|
||||||
|
"Number of /deposit per second",
|
||||||
|
"item/sec",
|
||||||
|
NB_DEPOSIT_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END (""),
|
PERF_TALER_MINTDB_INIT_CMD_END (""),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -191,16 +191,15 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.end_loop.label_loop);
|
cmd[i].details.end_loop.label_loop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command)
|
if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.end_loop.label_loop);
|
cmd[i].details.end_loop.label_loop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -218,7 +217,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.save_array.label_save);
|
cmd[i].details.save_array.label_save);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -226,7 +225,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_NONE == cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_NONE == cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.save_array.label_save);
|
cmd[i].details.save_array.label_save);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -238,7 +237,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.save_array.label_loop);
|
cmd[i].details.save_array.label_loop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -246,7 +245,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command)
|
if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.save_array.label_loop);
|
cmd[i].details.save_array.label_loop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -271,7 +270,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.load_array.label_save);
|
cmd[i].details.load_array.label_save);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -279,7 +278,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_CMD_SAVE_ARRAY != cmd[ret].command)
|
if (PERF_TALER_MINTDB_CMD_SAVE_ARRAY != cmd[ret].command)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.load_array.label_save);
|
cmd[i].details.load_array.label_save);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -291,7 +290,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.load_array.label_loop);
|
cmd[i].details.load_array.label_loop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -299,7 +298,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command)
|
if (PERF_TALER_MINTDB_CMD_LOOP != cmd[ret].command)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.load_array.label_loop);
|
cmd[i].details.load_array.label_loop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -325,16 +324,15 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.load_random.label_save);
|
cmd[i].details.load_random.label_save);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PERF_TALER_MINTDB_CMD_SAVE_ARRAY != cmd[ret].command)
|
if (PERF_TALER_MINTDB_CMD_SAVE_ARRAY != cmd[ret].command)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.load_random.label_save);
|
cmd[i].details.load_random.label_save);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -352,7 +350,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.gauger.label_start);
|
cmd[i].details.gauger.label_start);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -360,7 +358,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_TIME != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_TIME != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.gauger.label_start);
|
cmd[i].details.gauger.label_start);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -372,7 +370,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.gauger.label_stop);
|
cmd[i].details.gauger.label_stop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -380,7 +378,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_TIME != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_TIME != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.gauger.label_stop);
|
cmd[i].details.gauger.label_stop);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -398,7 +396,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.insert_deposit.label_coin);
|
cmd[i].details.insert_deposit.label_coin);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -406,7 +404,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.insert_deposit.label_coin);
|
cmd[i].details.insert_deposit.label_coin);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -424,7 +422,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_deposit.label_deposit);
|
cmd[i].details.get_deposit.label_deposit);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -432,7 +430,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_DEPOSIT != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_DEPOSIT != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_deposit.label_deposit);
|
cmd[i].details.get_deposit.label_deposit);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -450,7 +448,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_reserve.label_reserve);
|
cmd[i].details.get_reserve.label_reserve);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -458,7 +456,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_reserve.label_reserve);
|
cmd[i].details.get_reserve.label_reserve);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -476,7 +474,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_reserve_history.label_reserve);
|
cmd[i].details.get_reserve_history.label_reserve);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -484,7 +482,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_reserve_history.label_reserve);
|
cmd[i].details.get_reserve_history.label_reserve);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -502,7 +500,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_denomination.label_denom);
|
cmd[i].details.get_denomination.label_denom);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -510,7 +508,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_denomination.label_denom);
|
cmd[i].details.get_denomination.label_denom);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -528,7 +526,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.insert_withdraw.label_dki);
|
cmd[i].details.insert_withdraw.label_dki);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -536,7 +534,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_DENOMINATION_INFO != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.insert_withdraw.label_dki);
|
cmd[i].details.insert_withdraw.label_dki);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -548,7 +546,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.insert_withdraw.label_reserve);
|
cmd[i].details.insert_withdraw.label_reserve);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -556,7 +554,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_RESERVE != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.insert_withdraw.label_reserve);
|
cmd[i].details.insert_withdraw.label_reserve);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -574,7 +572,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (GNUNET_SYSERR == ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Undefined reference to %s",
|
"%d:Undefined reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_withdraw.label_coin);
|
cmd[i].details.get_withdraw.label_coin);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -582,7 +580,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
|
|||||||
if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type)
|
if (PERF_TALER_MINTDB_COIN != cmd[ret].exposed.type)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"%d:Wrong type reference to %s",
|
"%d:Wrong type reference to %s\n",
|
||||||
i,
|
i,
|
||||||
cmd[i].details.get_withdraw.label_coin);
|
cmd[i].details.get_withdraw.label_coin);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -1236,14 +1234,20 @@ int
|
|||||||
PERF_TALER_MINTDB_interpret (struct TALER_MINTDB_Plugin *db_plugin,
|
PERF_TALER_MINTDB_interpret (struct TALER_MINTDB_Plugin *db_plugin,
|
||||||
struct PERF_TALER_MINTDB_Cmd cmd[])
|
struct PERF_TALER_MINTDB_Cmd cmd[])
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
struct PERF_TALER_MINTDB_interpreter_state state =
|
struct PERF_TALER_MINTDB_interpreter_state state =
|
||||||
{.i = 0, .cmd = cmd, .plugin = db_plugin};
|
{.i = 0, .cmd = cmd, .plugin = db_plugin};
|
||||||
|
|
||||||
cmd_init (state.cmd);
|
|
||||||
GNUNET_assert (NULL !=
|
ret = cmd_init (state.cmd);
|
||||||
(state.session = db_plugin->get_session (db_plugin->cls,
|
if (GNUNET_SYSERR == ret)
|
||||||
GNUNET_YES)));
|
return ret;
|
||||||
interpret (&state);
|
state.session = db_plugin->get_session (db_plugin->cls,
|
||||||
|
GNUNET_YES);
|
||||||
|
GNUNET_assert (NULL != state.session);
|
||||||
|
ret = interpret (&state);
|
||||||
|
if (GNUNET_SYSERR == ret)
|
||||||
|
return ret;
|
||||||
cmd_clean (cmd);
|
cmd_clean (cmd);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
@ -1412,6 +1416,5 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name,
|
|||||||
}
|
}
|
||||||
TALER_MINTDB_plugin_unload (plugin);
|
TALER_MINTDB_plugin_unload (plugin);
|
||||||
GNUNET_CONFIGURATION_destroy (config);
|
GNUNET_CONFIGURATION_destroy (config);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -336,6 +336,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the /deposit API call
|
||||||
|
*/
|
||||||
|
#define PERF_TALER_MONTDB_INIT_CMD_DEPOSIT(_label, _label_coin)\
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT (_label ":insert deposit", _label_coin), \
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_GET_DEPOSIT (_label ":get deposit", _label ":insert deposit")
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts informations about a withdrawal in the database
|
* Inserts informations about a withdrawal in the database
|
||||||
*
|
*
|
||||||
@ -395,11 +403,11 @@
|
|||||||
* @param _label the label of the command
|
* @param _label the label of the command
|
||||||
* @param _label_coin the coin used for the deposit
|
* @param _label_coin the coin used for the deposit
|
||||||
*/
|
*/
|
||||||
#define PERF_TALER_MINTDB_INIT_CMD_deposit(_label, _label_coin) \
|
#define PERF_TALER_MINTDB_INIT_CMD_DEPOSIT(_label, _label_coin) \
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION (_label "coin history", \
|
PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION (_label "coin history", \
|
||||||
_label_coin), \
|
_label_coin), \
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT (_label "deposit", \
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT (_label "deposit", \
|
||||||
_label_coin),
|
_label_coin)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -854,7 +862,7 @@ union PERF_TALER_MINTDB_CMD_Details
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extra data related to the #PERF_TALER_MINTDB_CMD_GET_WITHDRAW command
|
* Extra data related to the #PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW command
|
||||||
*/
|
*/
|
||||||
struct PERF_TALER_MINTDB_CMD_insertWithdrawDetails
|
struct PERF_TALER_MINTDB_CMD_insertWithdrawDetails
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user