exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 4843a41fc4cb726c700114feacf7d5b30d7d97c3
parent a1029430b3a0cf79a555c0a8b6dc43e4a421f34b
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Fri,  3 Jun 2016 19:39:04 +0200

generating (global) blinding key for benchmark

Diffstat:
Msrc/benchmark/taler-exchange-benchmark.c | 24+++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c @@ -54,6 +54,12 @@ struct Reserve { }; + +/** + * Same blinding key for all coins + */ +struct TALER_DenominationBlindingKeyP blinding_key; + /** * Information regarding a coin; for simplicity, every * withdrawn coin is EUR 1 @@ -163,11 +169,13 @@ add_incoming_cb (void *cls, */ /** - * 0 set NULL the reserve handler for this call (otherwise do_shutdown() segfaults + * 0. set NULL the reserve handler for this call (otherwise do_shutdown() segfaults * when attempting to cancel this operation, which cannot since has been served) - * 1 Check if reserve got correctly created - * 2 Define per-coin stuff + * 1. Check if reserve got correctly created + * 2. Define per-coin stuff */ + unsigned int reserve_index = 0; // TEMPORARY + reserves[reserve_index].aih = NULL; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "/admin/add/incoming callback called\n"); return; @@ -190,6 +198,9 @@ benchmark_run (void *cls) struct GNUNET_TIME_Absolute execution_date; struct TALER_Amount reserve_amount; + GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, + &blinding_key, + sizeof (blinding_key)); TALER_string_to_amount ("EUR:24", &reserve_amount); /* FIXME bank_uri to be tuned to exchange's tastes */ sender_details = json_loads ("{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62}", @@ -234,13 +245,8 @@ benchmark_run (void *cls) /* coins */ - - - - - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "benchmark_run() returns\n"); -// GNUNET_SCHEDULER_shutdown (); + GNUNET_SCHEDULER_shutdown (); return; }