fix taler-aggregator-benchmark
This commit is contained in:
parent
942dd73794
commit
ec03f262b6
@ -251,7 +251,7 @@ add_refund (const struct Merchant *m,
|
|||||||
r.details.rtransaction_id = 42;
|
r.details.rtransaction_id = 42;
|
||||||
make_amount (0, 5000000, &r.details.refund_amount);
|
make_amount (0, 5000000, &r.details.refund_amount);
|
||||||
make_amount (0, 5, &r.details.refund_fee);
|
make_amount (0, 5, &r.details.refund_fee);
|
||||||
if (0 <=
|
if (0 >=
|
||||||
plugin->insert_refund (plugin->cls,
|
plugin->insert_refund (plugin->cls,
|
||||||
&r))
|
&r))
|
||||||
{
|
{
|
||||||
@ -307,8 +307,13 @@ add_deposit (const struct Merchant *m)
|
|||||||
deposit.wire_salt = m->wire_salt;
|
deposit.wire_salt = m->wire_salt;
|
||||||
deposit.receiver_wire_account = m->payto_uri;
|
deposit.receiver_wire_account = m->payto_uri;
|
||||||
deposit.timestamp = random_time ();
|
deposit.timestamp = random_time ();
|
||||||
|
do {
|
||||||
deposit.refund_deadline = random_time ();
|
deposit.refund_deadline = random_time ();
|
||||||
deposit.wire_deadline = random_time ();
|
deposit.wire_deadline = random_time ();
|
||||||
|
} while (GNUNET_TIME_timestamp_cmp (deposit.wire_deadline,
|
||||||
|
<,
|
||||||
|
deposit.refund_deadline));
|
||||||
|
|
||||||
make_amount (1, 0, &deposit.amount_with_fee);
|
make_amount (1, 0, &deposit.amount_with_fee);
|
||||||
make_amount (0, 5, &deposit.deposit_fee);
|
make_amount (0, 5, &deposit.deposit_fee);
|
||||||
if (0 >=
|
if (0 >=
|
||||||
@ -446,6 +451,9 @@ run (void *cls,
|
|||||||
}
|
}
|
||||||
GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
|
GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
|
||||||
NULL);
|
NULL);
|
||||||
|
memset (&issue,
|
||||||
|
0,
|
||||||
|
sizeof (issue));
|
||||||
RANDOMIZE (&issue.signature);
|
RANDOMIZE (&issue.signature);
|
||||||
issue.start
|
issue.start
|
||||||
= start;
|
= start;
|
||||||
@ -478,6 +486,7 @@ run (void *cls,
|
|||||||
TALER_DENOMINATION_RSA,
|
TALER_DENOMINATION_RSA,
|
||||||
1024));
|
1024));
|
||||||
alg_values.cipher = TALER_DENOMINATION_RSA;
|
alg_values.cipher = TALER_DENOMINATION_RSA;
|
||||||
|
denom_pub.age_mask = issue.age_mask;
|
||||||
TALER_denom_pub_hash (&denom_pub,
|
TALER_denom_pub_hash (&denom_pub,
|
||||||
&h_denom_pub);
|
&h_denom_pub);
|
||||||
make_amount (2, 0, &issue.value);
|
make_amount (2, 0, &issue.value);
|
||||||
@ -497,7 +506,6 @@ run (void *cls,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TALER_planchet_blinding_secret_create (&ps,
|
TALER_planchet_blinding_secret_create (&ps,
|
||||||
&alg_values,
|
&alg_values,
|
||||||
&bks);
|
&bks);
|
||||||
|
@ -97,8 +97,6 @@ TEH_PG_insert_deposit (void *cls,
|
|||||||
" FROM known_coins"
|
" FROM known_coins"
|
||||||
" WHERE coin_pub=$1"
|
" WHERE coin_pub=$1"
|
||||||
" ON CONFLICT DO NOTHING;");
|
" ON CONFLICT DO NOTHING;");
|
||||||
|
|
||||||
|
|
||||||
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
|
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
|
||||||
"insert_deposit",
|
"insert_deposit",
|
||||||
params);
|
params);
|
||||||
|
@ -45,16 +45,15 @@ TEH_PG_insert_refund (void *cls,
|
|||||||
TALER_amount_cmp_currency (&refund->details.refund_amount,
|
TALER_amount_cmp_currency (&refund->details.refund_amount,
|
||||||
&refund->details.refund_fee));
|
&refund->details.refund_fee));
|
||||||
|
|
||||||
/* Used in #postgres_insert_refund() to store refund information */
|
|
||||||
PREPARE (pg,
|
PREPARE (pg,
|
||||||
"insert_refund",
|
"insert_refund",
|
||||||
"INSERT INTO refunds "
|
"INSERT INTO refunds "
|
||||||
"(coin_pub "
|
"(coin_pub"
|
||||||
",deposit_serial_id"
|
",deposit_serial_id"
|
||||||
",merchant_sig "
|
",merchant_sig"
|
||||||
",rtransaction_id "
|
",rtransaction_id"
|
||||||
",amount_with_fee_val "
|
",amount_with_fee_val"
|
||||||
",amount_with_fee_frac "
|
",amount_with_fee_frac"
|
||||||
") SELECT $1, deposit_serial_id, $3, $5, $6, $7"
|
") SELECT $1, deposit_serial_id, $3, $5, $6, $7"
|
||||||
" FROM deposits"
|
" FROM deposits"
|
||||||
" WHERE coin_pub=$1"
|
" WHERE coin_pub=$1"
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "pg_helper.h"
|
#include "pg_helper.h"
|
||||||
#include "pg_get_wire_fee.h"
|
#include "pg_get_wire_fee.h"
|
||||||
|
|
||||||
|
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
TEH_PG_insert_wire_fee (void *cls,
|
TEH_PG_insert_wire_fee (void *cls,
|
||||||
const char *type,
|
const char *type,
|
||||||
|
Loading…
Reference in New Issue
Block a user