fixed tests
This commit is contained in:
parent
747d083279
commit
8ec6ef1ab8
@ -84,7 +84,7 @@ main (int argc, char ** argv)
|
|||||||
"03 - denomination load",
|
"03 - denomination load",
|
||||||
"03 - reserve load"),
|
"03 - reserve load"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - blindcoin array",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - save coin",
|
||||||
"03 - init withdraw loop",
|
"03 - init withdraw loop",
|
||||||
"03 - withdraw",
|
"03 - withdraw",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
@ -95,11 +95,11 @@ main (int argc, char ** argv)
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop",
|
||||||
NB_DEPOSIT_INIT),
|
NB_DEPOSIT_INIT),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - coin load",
|
||||||
"04 - deposit init loop",
|
"04 - deposit init loop",
|
||||||
"01 - save denomination"),
|
"03 - save coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit",
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit",
|
||||||
"04 - denomination load"),
|
"04 - coin load"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
|
||||||
"04 - deposit init loop",
|
"04 - deposit init loop",
|
||||||
@ -114,11 +114,11 @@ main (int argc, char ** argv)
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("05 - loop",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("05 - loop",
|
||||||
NB_DEPOSIT_SAVE),
|
NB_DEPOSIT_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("05 - deposit",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("05 - deposit load",
|
||||||
"05 - loop",
|
"05 - loop",
|
||||||
"04 - deposit array"),
|
"04 - deposit array"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_GET_DEPOSIT ("",
|
PERF_TALER_MINTDB_INIT_CMD_GET_DEPOSIT ("",
|
||||||
""),
|
"05 - deposit load"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"05 - loop"),
|
"05 - loop"),
|
||||||
|
@ -44,14 +44,14 @@ PERF_TALER_MINTDB_denomination_init ()
|
|||||||
|
|
||||||
master_prvt = GNUNET_CRYPTO_eddsa_key_create();
|
master_prvt = GNUNET_CRYPTO_eddsa_key_create();
|
||||||
|
|
||||||
GNUNET_assert (NULL !=
|
dki = GNUNET_new (struct TALER_MINTDB_DenominationKeyIssueInformation);
|
||||||
(dki = GNUNET_new (struct TALER_MINTDB_DenominationKeyIssueInformation)));
|
GNUNET_assert (NULL != dki);
|
||||||
GNUNET_assert (NULL !=
|
denom_priv.rsa_private_key
|
||||||
(denom_priv.rsa_private_key
|
= GNUNET_CRYPTO_rsa_private_key_create (PERF_TALER_MINTDB_RSA_SIZE);
|
||||||
= GNUNET_CRYPTO_rsa_private_key_create (PERF_TALER_MINTDB_RSA_SIZE)));
|
GNUNET_assert (NULL != denom_priv.rsa_private_key);
|
||||||
GNUNET_assert (NULL !=
|
denom_pub.rsa_public_key =
|
||||||
(denom_pub.rsa_public_key =
|
GNUNET_CRYPTO_rsa_private_key_get_public (denom_priv.rsa_private_key);
|
||||||
GNUNET_CRYPTO_rsa_private_key_get_public (denom_priv.rsa_private_key)));
|
GNUNET_assert (NULL != denom_pub.rsa_public_key);
|
||||||
{/* issue */
|
{/* issue */
|
||||||
struct TALER_MasterSignatureP signature;
|
struct TALER_MasterSignatureP signature;
|
||||||
struct TALER_DenominationKeyValidityPS properties;
|
struct TALER_DenominationKeyValidityPS properties;
|
||||||
@ -218,15 +218,20 @@ PERF_TALER_MINTDB_deposit_init (const struct PERF_TALER_MINTDB_Coin *coin)
|
|||||||
|
|
||||||
GNUNET_assert (NULL !=
|
GNUNET_assert (NULL !=
|
||||||
(deposit = GNUNET_malloc (sizeof (struct TALER_MINTDB_Deposit) + sizeof (wire))));
|
(deposit = GNUNET_malloc (sizeof (struct TALER_MINTDB_Deposit) + sizeof (wire))));
|
||||||
|
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
|
||||||
|
&h_contract);
|
||||||
|
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
|
||||||
|
&h_wire);
|
||||||
{ //csig
|
{ //csig
|
||||||
struct u32_presign
|
struct u32_presign
|
||||||
{
|
{
|
||||||
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
|
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
|
||||||
uint32_t data;
|
struct GNUNET_HashCode h_wire;
|
||||||
|
struct GNUNET_HashCode h_contract;
|
||||||
} unsigned_data;
|
} unsigned_data;
|
||||||
|
|
||||||
unsigned_data.data = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
|
unsigned_data.h_contract = h_contract;
|
||||||
UINT32_MAX);
|
unsigned_data.h_wire = h_wire;
|
||||||
unsigned_data.purpose.size = htonl (sizeof (struct u32_presign));
|
unsigned_data.purpose.size = htonl (sizeof (struct u32_presign));
|
||||||
unsigned_data.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
|
unsigned_data.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
@ -237,17 +242,13 @@ PERF_TALER_MINTDB_deposit_init (const struct PERF_TALER_MINTDB_Coin *coin)
|
|||||||
{ //merchant_pub
|
{ //merchant_pub
|
||||||
struct GNUNET_CRYPTO_EddsaPrivateKey *eddsa_prv;
|
struct GNUNET_CRYPTO_EddsaPrivateKey *eddsa_prv;
|
||||||
|
|
||||||
GNUNET_assert(NULL !=
|
eddsa_prv = GNUNET_CRYPTO_eddsa_key_create ();
|
||||||
(eddsa_prv = GNUNET_CRYPTO_eddsa_key_create ()));
|
GNUNET_assert(NULL != eddsa_prv);
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (
|
GNUNET_CRYPTO_eddsa_key_get_public (
|
||||||
eddsa_prv,
|
eddsa_prv,
|
||||||
&merchant_pub.eddsa_pub);
|
&merchant_pub.eddsa_pub);
|
||||||
GNUNET_free (eddsa_prv);
|
GNUNET_free (eddsa_prv);
|
||||||
}
|
}
|
||||||
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
|
|
||||||
&h_contract);
|
|
||||||
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
|
|
||||||
&h_wire);
|
|
||||||
timestamp = GNUNET_TIME_absolute_get ();
|
timestamp = GNUNET_TIME_absolute_get ();
|
||||||
refund_deadline = GNUNET_TIME_absolute_get ();
|
refund_deadline = GNUNET_TIME_absolute_get ();
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
@ -256,7 +257,15 @@ PERF_TALER_MINTDB_deposit_init (const struct PERF_TALER_MINTDB_Coin *coin)
|
|||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
TALER_string_to_amount (CURRENCY ":0.1",
|
TALER_string_to_amount (CURRENCY ":0.1",
|
||||||
&deposit_fee));
|
&deposit_fee));
|
||||||
deposit->coin = coin->public_info;
|
{
|
||||||
|
deposit->coin.coin_pub = coin->public_info.coin_pub;
|
||||||
|
deposit->coin.denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_public_key_dup (
|
||||||
|
coin->public_info.denom_pub.rsa_public_key);
|
||||||
|
GNUNET_assert (NULL != coin->public_info.denom_pub.rsa_public_key);
|
||||||
|
deposit->coin.denom_sig.rsa_signature = GNUNET_CRYPTO_rsa_signature_dup (
|
||||||
|
coin->public_info.denom_sig.rsa_signature);
|
||||||
|
GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature);
|
||||||
|
}
|
||||||
deposit->csig = csig;
|
deposit->csig = csig;
|
||||||
deposit->h_contract = h_contract;
|
deposit->h_contract = h_contract;
|
||||||
deposit->h_wire = h_wire;
|
deposit->h_wire = h_wire;
|
||||||
@ -283,21 +292,11 @@ PERF_TALER_MINTDB_deposit_copy (const struct TALER_MINTDB_Deposit *deposit)
|
|||||||
GNUNET_assert (NULL != (copy = GNUNET_new (struct TALER_MINTDB_Deposit)));
|
GNUNET_assert (NULL != (copy = GNUNET_new (struct TALER_MINTDB_Deposit)));
|
||||||
*copy = *deposit;
|
*copy = *deposit;
|
||||||
json_incref (copy->wire);
|
json_incref (copy->wire);
|
||||||
GNUNET_assert (NULL !=
|
copy->coin.denom_pub.rsa_public_key =
|
||||||
(copy->coin.denom_pub.rsa_public_key =
|
GNUNET_CRYPTO_rsa_public_key_dup (deposit->coin.denom_pub.rsa_public_key);
|
||||||
GNUNET_CRYPTO_rsa_public_key_dup (deposit->coin.denom_pub.rsa_public_key)));
|
copy->coin.denom_sig.rsa_signature =
|
||||||
{
|
GNUNET_CRYPTO_rsa_signature_dup (deposit->coin.denom_sig.rsa_signature);
|
||||||
char *buffer = NULL;
|
|
||||||
int size;
|
|
||||||
GNUNET_assert (0 <
|
|
||||||
(size = GNUNET_CRYPTO_rsa_signature_encode (
|
|
||||||
deposit->coin.denom_sig.rsa_signature,
|
|
||||||
&buffer)));
|
|
||||||
GNUNET_assert (NULL !=
|
|
||||||
(copy->coin.denom_sig.rsa_signature =
|
|
||||||
GNUNET_CRYPTO_rsa_signature_decode(buffer, size)));
|
|
||||||
GNUNET_free (buffer);
|
|
||||||
}
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,17 +330,18 @@ PERF_TALER_MINTDB_coin_init (
|
|||||||
const struct PERF_TALER_MINTDB_Reserve *reserve)
|
const struct PERF_TALER_MINTDB_Reserve *reserve)
|
||||||
{
|
{
|
||||||
struct PERF_TALER_MINTDB_Coin *coin;
|
struct PERF_TALER_MINTDB_Coin *coin;
|
||||||
|
|
||||||
GNUNET_assert (NULL !=
|
|
||||||
(coin = GNUNET_new (struct PERF_TALER_MINTDB_Coin)));
|
|
||||||
{/* priv */
|
|
||||||
struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
|
struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
|
||||||
|
|
||||||
GNUNET_assert (NULL !=
|
coin = GNUNET_new (struct PERF_TALER_MINTDB_Coin);
|
||||||
(priv = GNUNET_CRYPTO_eddsa_key_create()));
|
GNUNET_assert (NULL != coin);
|
||||||
|
/* priv */
|
||||||
|
|
||||||
|
priv = GNUNET_CRYPTO_eddsa_key_create();
|
||||||
|
GNUNET_assert (NULL != priv);
|
||||||
coin->priv = *priv;
|
coin->priv = *priv;
|
||||||
}
|
GNUNET_free (priv);
|
||||||
{/* public_info */
|
|
||||||
|
/* public_info */
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (&coin->priv,
|
GNUNET_CRYPTO_eddsa_key_get_public (&coin->priv,
|
||||||
&coin->public_info.coin_pub.eddsa_pub);
|
&coin->public_info.coin_pub.eddsa_pub);
|
||||||
GNUNET_assert (NULL !=
|
GNUNET_assert (NULL !=
|
||||||
@ -352,8 +352,8 @@ PERF_TALER_MINTDB_coin_init (
|
|||||||
GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key,
|
GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key,
|
||||||
&coin->public_info.coin_pub,
|
&coin->public_info.coin_pub,
|
||||||
sizeof (struct TALER_CoinSpendPublicKeyP))));
|
sizeof (struct TALER_CoinSpendPublicKeyP))));
|
||||||
}
|
|
||||||
{/* blind */
|
/* blind */
|
||||||
GNUNET_assert (NULL !=
|
GNUNET_assert (NULL !=
|
||||||
(coin->blind.sig.rsa_signature =
|
(coin->blind.sig.rsa_signature =
|
||||||
GNUNET_CRYPTO_rsa_signature_dup (coin->public_info.denom_sig.rsa_signature)));
|
GNUNET_CRYPTO_rsa_signature_dup (coin->public_info.denom_sig.rsa_signature)));
|
||||||
@ -376,12 +376,11 @@ PERF_TALER_MINTDB_coin_init (
|
|||||||
data.reserve_pub = reserve->reserve.pub;
|
data.reserve_pub = reserve->reserve.pub;
|
||||||
data.hash = coin->blind.h_coin_envelope;
|
data.hash = coin->blind.h_coin_envelope;
|
||||||
GNUNET_assert (NULL !=
|
GNUNET_assert (NULL !=
|
||||||
(coin->blind.sig.rsa_signature
|
(coin->blind.sig.rsa_signature =
|
||||||
= GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key,
|
GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key,
|
||||||
&data,
|
&data,
|
||||||
sizeof (data))));
|
sizeof (data))));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return coin;
|
return coin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,29 +397,30 @@ PERF_TALER_MINTDB_coin_copy (const struct PERF_TALER_MINTDB_Coin *coin)
|
|||||||
|
|
||||||
GNUNET_assert (NULL !=
|
GNUNET_assert (NULL !=
|
||||||
(copy = GNUNET_new (struct PERF_TALER_MINTDB_Coin)));
|
(copy = GNUNET_new (struct PERF_TALER_MINTDB_Coin)));
|
||||||
|
/* priv */
|
||||||
copy->priv = coin->priv;
|
copy->priv = coin->priv;
|
||||||
{/* public_info */
|
/* public_info */
|
||||||
copy->public_info.coin_pub = coin->public_info.coin_pub;
|
copy->public_info.coin_pub = coin->public_info.coin_pub;
|
||||||
GNUNET_assert (NULL !=
|
copy->public_info.denom_pub.rsa_public_key =
|
||||||
(copy->public_info.denom_pub.rsa_public_key =
|
GNUNET_CRYPTO_rsa_public_key_dup (coin->public_info.denom_pub.rsa_public_key);
|
||||||
GNUNET_CRYPTO_rsa_public_key_dup (coin->public_info.denom_pub.rsa_public_key)));
|
GNUNET_assert (NULL != copy->public_info.denom_pub.rsa_public_key);
|
||||||
GNUNET_assert (NULL !=
|
copy->public_info.denom_sig.rsa_signature =
|
||||||
(copy->public_info.denom_sig.rsa_signature =
|
GNUNET_CRYPTO_rsa_signature_dup (coin->public_info.denom_sig.rsa_signature);
|
||||||
GNUNET_CRYPTO_rsa_signature_dup (coin->public_info.denom_sig.rsa_signature)));
|
GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature);
|
||||||
}
|
|
||||||
{/* blind */
|
/* blind */
|
||||||
GNUNET_assert (NULL !=
|
copy->blind.sig.rsa_signature =
|
||||||
(copy->blind.sig.rsa_signature =
|
GNUNET_CRYPTO_rsa_signature_dup (coin->blind.sig.rsa_signature);
|
||||||
GNUNET_CRYPTO_rsa_signature_dup (coin->blind.sig.rsa_signature)));
|
GNUNET_assert (NULL != copy->blind.sig.rsa_signature);
|
||||||
GNUNET_assert (NULL !=
|
copy->blind.denom_pub.rsa_public_key =
|
||||||
(copy->blind.denom_pub.rsa_public_key =
|
GNUNET_CRYPTO_rsa_public_key_dup (coin->blind.denom_pub.rsa_public_key);
|
||||||
GNUNET_CRYPTO_rsa_public_key_dup (coin->blind.denom_pub.rsa_public_key)));
|
GNUNET_assert (NULL != copy->blind.denom_pub.rsa_public_key);
|
||||||
copy->blind.amount_with_fee = coin->blind.amount_with_fee;
|
copy->blind.amount_with_fee = coin->blind.amount_with_fee;
|
||||||
copy->blind.withdraw_fee = coin->blind.withdraw_fee;
|
copy->blind.withdraw_fee = coin->blind.withdraw_fee;
|
||||||
copy->blind.reserve_pub = coin->blind.reserve_pub;
|
copy->blind.reserve_pub = coin->blind.reserve_pub;
|
||||||
copy->blind.h_coin_envelope = coin->blind.h_coin_envelope;
|
copy->blind.h_coin_envelope = coin->blind.h_coin_envelope;
|
||||||
copy->blind.reserve_sig = coin->blind.reserve_sig;
|
copy->blind.reserve_sig = coin->blind.reserve_sig;
|
||||||
}
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
GNUNET_assert (NULL !=
|
GNUNET_assert (NULL !=
|
||||||
(deposit = PERF_TALER_MINTDB_deposit_init (state->cmd[coin_index].exposed.data.coin)));
|
(deposit = PERF_TALER_MINTDB_deposit_init (state->cmd[coin_index].exposed.data.coin)));
|
||||||
|
|
||||||
GNUNET_assert (
|
GNUNET_assert (GNUNET_OK ==
|
||||||
state->plugin->insert_deposit (state->plugin->cls,
|
state->plugin->insert_deposit (state->plugin->cls,
|
||||||
state->session,
|
state->session,
|
||||||
deposit));
|
deposit));
|
||||||
@ -519,12 +519,10 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
|||||||
int source_index;
|
int source_index;
|
||||||
struct PERF_TALER_MINTDB_Data data;
|
struct PERF_TALER_MINTDB_Data data;
|
||||||
|
|
||||||
GNUNET_assert (GNUNET_SYSERR !=
|
source_index = cmd_find (state->cmd,
|
||||||
(source_index = cmd_find (state->cmd,
|
state->cmd[state->i].details.get_deposit.label_deposit);
|
||||||
state->cmd[state->i]
|
GNUNET_assert (GNUNET_SYSERR != source_index);
|
||||||
.details.get_deposit.label_deposit)));
|
data = state->cmd[source_index].exposed;
|
||||||
data_copy (&state->cmd[source_index].exposed,
|
|
||||||
&data);
|
|
||||||
state->plugin->have_deposit (state->plugin->cls,
|
state->plugin->have_deposit (state->plugin->cls,
|
||||||
state->session,
|
state->session,
|
||||||
data.data.deposit);
|
data.data.deposit);
|
||||||
@ -726,14 +724,14 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name,
|
|||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop",
|
||||||
PERF_TALER_MINTDB_NB_DENOMINATION_INIT),
|
PERF_TALER_MINTDB_NB_DENOMINATION_INIT),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("01 - start transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - denomination"),
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - denomination"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("01 - commit transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination",
|
||||||
"01 - denomination loop",
|
"01 - denomination loop",
|
||||||
"01 - denomination",
|
"01 - denomination",
|
||||||
PERF_TALER_MINTDB_NB_DENOMINATION_SAVE),
|
PERF_TALER_MINTDB_NB_DENOMINATION_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("01 - denomination loop end",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"01 - denomination loop"),
|
"01 - denomination loop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("01 - init denomination complete"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("01 - init denomination complete"),
|
||||||
// End of initialization
|
// End of initialization
|
||||||
@ -745,14 +743,14 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name,
|
|||||||
"02 - init reserve loop",
|
"02 - init reserve loop",
|
||||||
"02 - reserve",
|
"02 - reserve",
|
||||||
PERF_TALER_MINTDB_NB_RESERVE_SAVE),
|
PERF_TALER_MINTDB_NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("02 - init reserve end loop",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"02 - init reserve loop"),
|
"02 - init reserve loop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("02 - reserve init complete"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("02 - reserve init complete"),
|
||||||
// End reserve init
|
// End reserve init
|
||||||
// Withdrawal initialization
|
// Withdrawal initialization
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop",
|
||||||
PERF_TALER_MINTDB_NB_WITHDRAW_INIT),
|
PERF_TALER_MINTDB_NB_WITHDRAW_INIT),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("03 - start transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load",
|
||||||
"03 - init withdraw loop",
|
"03 - init withdraw loop",
|
||||||
"01 - save denomination"),
|
"01 - save denomination"),
|
||||||
@ -762,12 +760,12 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name,
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("03 - withdraw",
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("03 - withdraw",
|
||||||
"03 - denomination load",
|
"03 - denomination load",
|
||||||
"03 - reserve load"),
|
"03 - reserve load"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("03 - commit transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - blindcoin array",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - save coin",
|
||||||
"03 - init withdraw loop",
|
"03 - init withdraw loop",
|
||||||
"03 - withdraw",
|
"03 - withdraw",
|
||||||
PERF_TALER_MINTDB_NB_WITHDRAW_SAVE),
|
PERF_TALER_MINTDB_NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("03 - withdraw init end loop",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||||
"03 - init withdraw loop"),
|
"03 - init withdraw loop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("03 - withdraw init complete"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("03 - withdraw init complete"),
|
||||||
//End of withdrawal initialization
|
//End of withdrawal initialization
|
||||||
@ -777,7 +775,7 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name,
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load",
|
||||||
"04 - deposit init loop",
|
"04 - deposit init loop",
|
||||||
"01 - save denomination"),
|
"03 - save coin"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit",
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit",
|
||||||
"04 - denomination load"),
|
"04 - denomination load"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"),
|
||||||
@ -848,7 +846,7 @@ PERF_TALER_MINTDB_run_benchmark (const char *benchmark_name,
|
|||||||
if (GNUNET_OK != ret)
|
if (GNUNET_OK != ret)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Error during database initialization");
|
"Error while runing the benchmark");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/* Drop tables */
|
/* Drop tables */
|
||||||
|
@ -90,7 +90,7 @@ main (int argc, char ** argv)
|
|||||||
"03 - denomination load",
|
"03 - denomination load",
|
||||||
"03 - reserve load"),
|
"03 - reserve load"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("03 - commit transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("03 - commit transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - blindcoin array",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - coin array",
|
||||||
"03 - init withdraw loop",
|
"03 - init withdraw loop",
|
||||||
"03 - withdraw",
|
"03 - withdraw",
|
||||||
NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
@ -103,11 +103,11 @@ main (int argc, char ** argv)
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop",
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop",
|
||||||
NB_DEPOSIT_INIT),
|
NB_DEPOSIT_INIT),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - coin load",
|
||||||
"04 - deposit init loop",
|
"04 - deposit init loop",
|
||||||
"01 - save denomination"),
|
"03 - coin array"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit",
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit",
|
||||||
"04 - denomination load"),
|
"04 - coin load"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
|
||||||
"04 - deposit init loop",
|
"04 - deposit init loop",
|
||||||
|
Loading…
Reference in New Issue
Block a user