fixes for melt insertion
This commit is contained in:
parent
d238b9d398
commit
b456400ab2
@ -25,8 +25,9 @@
|
|||||||
#define NB_DENOMINATION_INIT 15
|
#define NB_DENOMINATION_INIT 15
|
||||||
#define NB_DENOMINATION_SAVE 15
|
#define NB_DENOMINATION_SAVE 15
|
||||||
|
|
||||||
#define BIGGER 100000
|
#define SMALL 10
|
||||||
#define BIG 10000
|
#define BIG 100
|
||||||
|
#define BIGGER 1000
|
||||||
|
|
||||||
#define NB_RESERVE_INIT BIGGER
|
#define NB_RESERVE_INIT BIGGER
|
||||||
#define NB_RESERVE_SAVE BIG
|
#define NB_RESERVE_SAVE BIG
|
||||||
@ -40,6 +41,9 @@
|
|||||||
#define NB_REFRESH_INIT BIGGER
|
#define NB_REFRESH_INIT BIGGER
|
||||||
#define NB_REFRESH_SAVE BIG
|
#define NB_REFRESH_SAVE BIG
|
||||||
|
|
||||||
|
#define NB_MELT_INIT BIG
|
||||||
|
#define NB_MELT_SAVE SMALL
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the performances tests for the mint database
|
* Runs the performances tests for the mint database
|
||||||
* and logs the results using Gauger
|
* and logs the results using Gauger
|
||||||
@ -137,7 +141,7 @@ main (int argc, char ** argv)
|
|||||||
/* End of refresh session initialization */
|
/* End of refresh session initialization */
|
||||||
/* Refresh melt initialization */
|
/* Refresh melt initialization */
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("06 - refresh melt init loop",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("06 - refresh melt init loop",
|
||||||
NB_REFRESH_INIT),
|
NB_MELT_INIT),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - session hash",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - session hash",
|
||||||
"06 - refresh melt init loop",
|
"06 - refresh melt init loop",
|
||||||
@ -155,58 +159,58 @@ main (int argc, char ** argv)
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of initialization"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of initialization"),
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("Start of performances measuring"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("Start of performances measuring"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("05 - start"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("21 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("05 - reserve insert measure",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("21 - reserve insert measure",
|
||||||
NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("05 - reserve"),
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("21 - reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("05 - insert",
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("21 - insert",
|
||||||
"05 - reserve"),
|
"21 - reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"05 - reserve insert measure"),
|
"21 - reserve insert measure"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("05 - stop"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("21 - stop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("05 - gauger",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("21 - gauger",
|
||||||
"05 - start",
|
"21 - start",
|
||||||
"05 - stop",
|
"21 - stop",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of reserve inserted per second",
|
"Number of reserve inserted per second",
|
||||||
"item/sec",
|
"item/sec",
|
||||||
NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve insertion"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve insertion"),
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("06 - start"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("06 - reserve load measure",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("22 - reserve load measure",
|
||||||
NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - reserve",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("22 - reserve",
|
||||||
"06 - reserve load measure",
|
"22 - reserve load measure",
|
||||||
"02 - save reserve"),
|
"02 - save reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE ("06 - get",
|
PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE ("22 - get",
|
||||||
"06 - reserve"),
|
"22 - reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"06 - reserve load measure"),
|
"22 - reserve load measure"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("06 - stop"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - stop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
"06 - start",
|
"22 - start",
|
||||||
"06 - stop",
|
"22 - stop",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of reserve loaded per second",
|
"Number of reserve loaded per second",
|
||||||
"item/sec",
|
"item/sec",
|
||||||
NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve retreival"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve retreival"),
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("07 - start"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("07 - reserve history measure",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("23 - reserve history measure",
|
||||||
NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("07 - reserve",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("23 - reserve",
|
||||||
"07 - reserve history measure",
|
"23 - reserve history measure",
|
||||||
"02 - save reserve"),
|
"02 - save reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE_HISTORY ("",
|
PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE_HISTORY ("",
|
||||||
"07 - reserve"),
|
"23 - reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"07 - reserve history measure"),
|
"23 - reserve history measure"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("07 - stop"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - stop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
"07 - start",
|
"23 - start",
|
||||||
"07 - stop",
|
"23 - stop",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of reserve history loaded per second",
|
"Number of reserve history loaded per second",
|
||||||
"item/sec",
|
"item/sec",
|
||||||
@ -214,114 +218,130 @@ main (int argc, char ** argv)
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve history access"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve history access"),
|
||||||
|
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("08 - start"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("08 - withdraw insert measure",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("24 - withdraw insert measure",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("08 - reserve",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - reserve",
|
||||||
"08 - withdraw insert measure",
|
"24 - withdraw insert measure",
|
||||||
"02 - save reserve"),
|
"02 - save reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("08 - denomination",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - denomination",
|
||||||
"08 - withdraw insert measure",
|
"24 - withdraw insert measure",
|
||||||
"01 - save denomination"),
|
"01 - save denomination"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("08 - withdraw",
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("24 - withdraw",
|
||||||
"08 - denomination",
|
"24 - denomination",
|
||||||
"08 - reserve"),
|
"24 - reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("08 - insert",
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("24 - insert",
|
||||||
"08 - withdraw"),
|
"24 - withdraw"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"08 - withdraw insert measure"),
|
"24 - withdraw insert measure"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("08 - stop"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - stop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
"08 - start",
|
"24 - start",
|
||||||
"08 - stop",
|
"24 - stop",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of withdraw insert per second",
|
"Number of withdraw insert per second",
|
||||||
"item/sec",
|
"item/sec",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw insertion"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw insertion"),
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("09 - start"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("09 - withdraw insert measure",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("25 - withdraw insert measure",
|
||||||
NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("09 - coin",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("25 - coin",
|
||||||
"09 - withdraw insert measure",
|
"25 - withdraw insert measure",
|
||||||
"03 - save coin"),
|
"03 - save coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW ("",
|
PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW ("",
|
||||||
"09 - coin"),
|
"25 - coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"09 - withdraw insert measure"),
|
"25 - withdraw insert measure"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("09 - stop"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - stop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
"09 - start",
|
"25 - start",
|
||||||
"09 - stop",
|
"25 - stop",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of withdraw loaded per second",
|
"Number of withdraw loaded per second",
|
||||||
"item/sec",
|
"item/sec",
|
||||||
NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw loading"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw loading"),
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("10 - start"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("10 - get coin transaction",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("26 - get coin transaction",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("10 - coin",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("26 - coin",
|
||||||
"10 - get coin transaction",
|
"26 - get coin transaction",
|
||||||
"03 - save coin"),
|
"03 - save coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION("",
|
PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION("",
|
||||||
"10 - coin"),
|
"26 - coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"10 - get coin transaction"),
|
"26 - get coin transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("10 - end"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - end"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
"10 - start",
|
"26 - start",
|
||||||
"10 - end",
|
"26 - end",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of coin transaction history loaded per second",
|
"Number of coin transaction history loaded per second",
|
||||||
"item/sec",
|
"item/sec",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of transaction loading"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of transaction loading"),
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("11 - start"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("11 - /withdraw/sign",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("27 - /withdraw/sign",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("11 - reserve",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - reserve",
|
||||||
"11 - /withdraw/sign",
|
"27 - /withdraw/sign",
|
||||||
"02 - save reserve"),
|
"02 - save reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("11 - dki",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - dki",
|
||||||
"11 - /withdraw/sign",
|
"27 - /withdraw/sign",
|
||||||
"01 - save denomination"),
|
"01 - save denomination"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_WITHDRAW_SIGN ("",
|
PERF_TALER_MINTDB_INIT_CMD_WITHDRAW_SIGN ("",
|
||||||
"11 - dki",
|
"27 - dki",
|
||||||
"11 - reserve"),
|
"27 - reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"11 - /withdraw/sign"),
|
"27 - /withdraw/sign"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("11 - end"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - end"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
"11 - start",
|
"27 - start",
|
||||||
"11 - end",
|
"27 - end",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of /withdraw/sign per second",
|
"Number of /withdraw/sign per second",
|
||||||
"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_GET_TIME ("28 - start"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("12 - /deposit",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("28 - /deposit",
|
||||||
NB_DEPOSIT_SAVE),
|
NB_DEPOSIT_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("12 - coin",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("28 - coin",
|
||||||
"12 - /deposit",
|
"28 - /deposit",
|
||||||
"03 - save coin"),
|
"03 - save coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEPOSIT ("12 - deposit",
|
PERF_TALER_MINTDB_INIT_CMD_DEPOSIT ("28 - deposit",
|
||||||
"12 - coin"),
|
"28 - coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"12 - /deposit"),
|
"28 - /deposit"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("12 - stop"),
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("28 - stop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
"12 - start",
|
"28 - start",
|
||||||
"12 - stop",
|
"28 - stop",
|
||||||
"POSTGRES",
|
"POSTGRES",
|
||||||
"Number of /deposit per second",
|
"Number of /deposit per second",
|
||||||
"item/sec",
|
"item/sec",
|
||||||
NB_DEPOSIT_SAVE),
|
NB_DEPOSIT_SAVE),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("29 - start"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("29 - insert refresh session",
|
||||||
|
NB_REFRESH_SAVE),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_REFRESH_SESSION (""),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
|
"29 - insert refresh session"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("29 - stop"),
|
||||||
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||||
|
"29 - start",
|
||||||
|
"29 - stop",
|
||||||
|
"POSTGRES",
|
||||||
|
"Number of refresh session inserted per second",
|
||||||
|
"item/sec",
|
||||||
|
NB_REFRESH_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END (""),
|
PERF_TALER_MINTDB_INIT_CMD_END (""),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1141,14 +1141,15 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
case PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT:
|
case PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT:
|
||||||
{
|
{
|
||||||
int deposit_index;
|
int deposit_index;
|
||||||
|
int ret;
|
||||||
struct TALER_MINTDB_Deposit *deposit;
|
struct TALER_MINTDB_Deposit *deposit;
|
||||||
|
|
||||||
deposit_index = state->cmd[state->i].details.insert_deposit.index_deposit;
|
deposit_index = state->cmd[state->i].details.insert_deposit.index_deposit;
|
||||||
deposit = state->cmd[deposit_index].exposed.data.deposit;
|
deposit = state->cmd[deposit_index].exposed.data.deposit;
|
||||||
GNUNET_assert (GNUNET_OK ==
|
ret = state->plugin->insert_deposit (state->plugin->cls,
|
||||||
state->plugin->insert_deposit (state->plugin->cls,
|
|
||||||
state->session,
|
state->session,
|
||||||
deposit));
|
deposit);
|
||||||
|
GNUNET_assert (GNUNET_SYSERR != ret);
|
||||||
state->cmd[state->i].exposed.data.deposit = deposit;
|
state->cmd[state->i].exposed.data.deposit = deposit;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1156,13 +1157,15 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
case PERF_TALER_MINTDB_CMD_GET_DEPOSIT:
|
case PERF_TALER_MINTDB_CMD_GET_DEPOSIT:
|
||||||
{
|
{
|
||||||
unsigned int source_index;
|
unsigned int source_index;
|
||||||
|
int ret;
|
||||||
struct PERF_TALER_MINTDB_Data *data;
|
struct PERF_TALER_MINTDB_Data *data;
|
||||||
|
|
||||||
source_index = state->cmd[state->i].details.get_deposit.index_deposit;
|
source_index = state->cmd[state->i].details.get_deposit.index_deposit;
|
||||||
data = &state->cmd[source_index].exposed;
|
data = &state->cmd[source_index].exposed;
|
||||||
state->plugin->have_deposit (state->plugin->cls,
|
ret = state->plugin->have_deposit (state->plugin->cls,
|
||||||
state->session,
|
state->session,
|
||||||
data->data.deposit);
|
data->data.deposit);
|
||||||
|
GNUNET_assert (GNUNET_SYSERR != ret);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1178,6 +1181,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
case PERF_TALER_MINTDB_CMD_INSERT_RESERVE:
|
case PERF_TALER_MINTDB_CMD_INSERT_RESERVE:
|
||||||
{
|
{
|
||||||
unsigned int reserve_index;
|
unsigned int reserve_index;
|
||||||
|
int ret;
|
||||||
struct PERF_TALER_MINTDB_Reserve *reserve;
|
struct PERF_TALER_MINTDB_Reserve *reserve;
|
||||||
json_t *details = NULL;
|
json_t *details = NULL;
|
||||||
|
|
||||||
@ -1188,21 +1192,20 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
GNUNET_CRYPTO_QUALITY_WEAK,
|
GNUNET_CRYPTO_QUALITY_WEAK,
|
||||||
UINT32_MAX));
|
UINT32_MAX));
|
||||||
GNUNET_assert (NULL != details);
|
GNUNET_assert (NULL != details);
|
||||||
state->plugin->reserves_in_insert (
|
ret = state->plugin->reserves_in_insert (state->plugin->cls,
|
||||||
state->plugin->cls,
|
|
||||||
state->session,
|
state->session,
|
||||||
&reserve->reserve.pub,
|
&reserve->reserve.pub,
|
||||||
&reserve->reserve.balance,
|
&reserve->reserve.balance,
|
||||||
GNUNET_TIME_absolute_get (),
|
GNUNET_TIME_absolute_get (),
|
||||||
details
|
details);
|
||||||
);
|
GNUNET_assert (GNUNET_SYSERR != ret);
|
||||||
json_decref (details);
|
json_decref (details);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PERF_TALER_MINTDB_CMD_GET_RESERVE:
|
case PERF_TALER_MINTDB_CMD_GET_RESERVE:
|
||||||
{
|
{
|
||||||
int reserve_index;
|
unsigned int reserve_index;
|
||||||
int ret;
|
int ret;
|
||||||
struct PERF_TALER_MINTDB_Data *data;
|
struct PERF_TALER_MINTDB_Data *data;
|
||||||
|
|
||||||
@ -1218,7 +1221,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
|
|
||||||
case PERF_TALER_MINTDB_CMD_GET_RESERVE_HISTORY:
|
case PERF_TALER_MINTDB_CMD_GET_RESERVE_HISTORY:
|
||||||
{
|
{
|
||||||
int reserve_index;
|
unsigned int reserve_index;
|
||||||
struct TALER_MINTDB_ReserveHistory *history;
|
struct TALER_MINTDB_ReserveHistory *history;
|
||||||
struct PERF_TALER_MINTDB_Data *data;
|
struct PERF_TALER_MINTDB_Data *data;
|
||||||
|
|
||||||
@ -1237,6 +1240,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
{
|
{
|
||||||
struct TALER_MINTDB_DenominationKeyIssueInformation *dki =
|
struct TALER_MINTDB_DenominationKeyIssueInformation *dki =
|
||||||
PERF_TALER_MINTDB_denomination_init ();
|
PERF_TALER_MINTDB_denomination_init ();
|
||||||
|
GNUNET_assert (NULL != dki);
|
||||||
state->cmd[state->i].exposed.data.dki = dki;
|
state->cmd[state->i].exposed.data.dki = dki;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1275,7 +1279,8 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
|
|
||||||
case PERF_TALER_MINTDB_CMD_CREATE_WITHDRAW:
|
case PERF_TALER_MINTDB_CMD_CREATE_WITHDRAW:
|
||||||
{
|
{
|
||||||
int dki_index, reserve_index;
|
unsigned int dki_index;
|
||||||
|
unsigned int reserve_index;
|
||||||
struct PERF_TALER_MINTDB_Coin *coin ;
|
struct PERF_TALER_MINTDB_Coin *coin ;
|
||||||
|
|
||||||
dki_index = state->cmd[state->i].details.create_withdraw.index_dki;
|
dki_index = state->cmd[state->i].details.create_withdraw.index_dki;
|
||||||
@ -1371,9 +1376,8 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
|
|
||||||
case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_MELT:
|
case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_MELT:
|
||||||
{
|
{
|
||||||
int hash_index;
|
unsigned int hash_index;
|
||||||
int coin_index;
|
unsigned int coin_index;
|
||||||
int ret;
|
|
||||||
struct GNUNET_HashCode *hash;
|
struct GNUNET_HashCode *hash;
|
||||||
struct TALER_MINTDB_RefreshMelt *melt;
|
struct TALER_MINTDB_RefreshMelt *melt;
|
||||||
struct PERF_TALER_MINTDB_Coin *coin;
|
struct PERF_TALER_MINTDB_Coin *coin;
|
||||||
@ -1384,28 +1388,29 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
coin = state->cmd[coin_index].exposed.data.coin;
|
coin = state->cmd[coin_index].exposed.data.coin;
|
||||||
melt = PERF_TALER_MINTDB_refresh_melt_init (hash,
|
melt = PERF_TALER_MINTDB_refresh_melt_init (hash,
|
||||||
coin);
|
coin);
|
||||||
ret = state->plugin->insert_refresh_melt (state->plugin->cls,
|
state->plugin->insert_refresh_melt (state->plugin->cls,
|
||||||
state->session,
|
state->session,
|
||||||
1,
|
1,
|
||||||
melt);
|
melt);
|
||||||
GNUNET_assert (GNUNET_SYSERR != ret);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PERF_TALER_MINTDB_CMD_GET_REFRESH_MELT:
|
case PERF_TALER_MINTDB_CMD_GET_REFRESH_MELT:
|
||||||
{
|
{
|
||||||
int hash_index;
|
int ret;
|
||||||
|
unsigned int hash_index;
|
||||||
struct GNUNET_HashCode *hash;
|
struct GNUNET_HashCode *hash;
|
||||||
struct TALER_MINTDB_RefreshMelt melt;
|
struct TALER_MINTDB_RefreshMelt melt;
|
||||||
|
|
||||||
hash_index = cmd_find (state->cmd,
|
hash_index = cmd_find (state->cmd,
|
||||||
state->cmd[state->i].details.get_refresh_melt.label_hash);
|
state->cmd[state->i].details.get_refresh_melt.label_hash);
|
||||||
hash = state->cmd[hash_index].exposed.data.session_hash;
|
hash = state->cmd[hash_index].exposed.data.session_hash;
|
||||||
state->plugin->get_refresh_melt (state->plugin->cls,
|
ret = state->plugin->get_refresh_melt (state->plugin->cls,
|
||||||
state->session,
|
state->session,
|
||||||
hash,
|
hash,
|
||||||
1,
|
1,
|
||||||
&melt);
|
&melt);
|
||||||
|
GNUNET_assert (GNUNET_SYSERR != ret);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user