From c38f521dd8342a609a11daa8b5d3916cb517efdd Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Tue, 18 Dec 2018 16:09:17 +0100 Subject: /deposit: #5284. --- src/benchmark/taler-exchange-benchmark.c | 1 - src/exchange-lib/test_exchange_api_new.c | 26 ++++++++++++-------------- src/exchange-lib/test_exchange_api_twisted.c | 3 --- src/exchange-lib/testing_api_cmd_deposit.c | 11 +---------- src/include/taler_testing_lib.h | 2 -- 5 files changed, 13 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c index c93cfd55b..7c4e69fe6 100644 --- a/src/benchmark/taler-exchange-benchmark.c +++ b/src/benchmark/taler-exchange-benchmark.c @@ -430,7 +430,6 @@ run (void *cls, TALER_TESTING_cmd_deposit_with_retry (TALER_TESTING_cmd_deposit ("deposit", - is->exchange, withdraw_label, 0, /* Index of the one withdrawn coin in the traits. */ TALER_TESTING_make_wire_details diff --git a/src/exchange-lib/test_exchange_api_new.c b/src/exchange-lib/test_exchange_api_new.c index b061d86c0..b7bce47b1 100644 --- a/src/exchange-lib/test_exchange_api_new.c +++ b/src/exchange-lib/test_exchange_api_new.c @@ -217,7 +217,7 @@ run (void *cls, * Spend the coin. */ TALER_TESTING_cmd_deposit - ("deposit-simple", is->exchange, "withdraw-coin-1", 0, + ("deposit-simple", "withdraw-coin-1", 0, TALER_TESTING_make_wire_details (42, fakebank_url), "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", @@ -236,7 +236,7 @@ run (void *cls, * Try to double spend using different wire details. */ TALER_TESTING_cmd_deposit - ("deposit-double-1", is->exchange, "withdraw-coin-1", 0, + ("deposit-double-1", "withdraw-coin-1", 0, TALER_TESTING_make_wire_details (43, fakebank_url), "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", @@ -252,7 +252,7 @@ run (void *cls, * how can a different id be generated? */ TALER_TESTING_cmd_deposit - ("deposit-double-1", is->exchange, "withdraw-coin-1", 0, + ("deposit-double-1", "withdraw-coin-1", 0, TALER_TESTING_make_wire_details (43, fakebank_url), "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", @@ -262,7 +262,7 @@ run (void *cls, * Try to double spend with different proposal. */ TALER_TESTING_cmd_deposit - ("deposit-double-2", is->exchange, "withdraw-coin-1", 0, + ("deposit-double-2", "withdraw-coin-1", 0, TALER_TESTING_make_wire_details (43, fakebank_url), "{\"items\":[{\"name\":\"ice cream\",\"value\":2}]}", @@ -303,7 +303,7 @@ run (void *cls, * deposit fee) */ TALER_TESTING_cmd_deposit - ("refresh-deposit-partial", is->exchange, + ("refresh-deposit-partial", "refresh-withdraw-coin-1", 0, TALER_TESTING_make_wire_details (42, fakebank_url), @@ -343,7 +343,7 @@ run (void *cls, * Try to spend a refreshed EUR:1 coin */ TALER_TESTING_cmd_deposit - ("refresh-deposit-refreshed-1a", is->exchange, + ("refresh-deposit-refreshed-1a", "refresh-reveal-1-idempotency", 0, TALER_TESTING_make_wire_details (42, fakebank_url), @@ -355,7 +355,7 @@ run (void *cls, * Try to spend a refreshed EUR:0.1 coin */ TALER_TESTING_cmd_deposit - ("refresh-deposit-refreshed-1b", is->exchange, + ("refresh-deposit-refreshed-1b", "refresh-reveal-1", 3, TALER_TESTING_make_wire_details (43, fakebank_url), @@ -494,7 +494,6 @@ run (void *cls, TALER_TESTING_cmd_deposit ("deposit-unaggregated", - is->exchange, "withdraw-coin-unaggregated", 0, TALER_TESTING_make_wire_details @@ -542,7 +541,7 @@ run (void *cls, * receive EUR:4.99 due to 1 ct deposit fee) */ TALER_TESTING_cmd_deposit - ("deposit-refund-1", is->exchange, "withdraw-coin-r1", 0, + ("deposit-refund-1", "withdraw-coin-r1", 0, TALER_TESTING_make_wire_details (42, fakebank_url), "{\"items\":[{\"name\":\"ice cream\"," @@ -589,7 +588,7 @@ run (void *cls, * due to refund) (merchant would receive EUR:4.98 due to * 1 ct deposit fee) */ TALER_TESTING_cmd_deposit - ("deposit-refund-2", is->exchange, "withdraw-coin-r1", 0, + ("deposit-refund-2", "withdraw-coin-r1", 0, TALER_TESTING_make_wire_details (42, fakebank_url), "{\"items\":[{\"name\":\"more ice cream\"," @@ -641,7 +640,7 @@ run (void *cls, TALER_TESTING_cmd_deposit - ("deposit-refund-1b", is->exchange, "withdraw-coin-rb", 0, + ("deposit-refund-1b", "withdraw-coin-rb", 0, TALER_TESTING_make_wire_details (42, fakebank_url), "{\"items\":[{\"name\":\"ice cream\"," @@ -804,7 +803,7 @@ run (void *cls, MHD_HTTP_OK), TALER_TESTING_cmd_deposit - ("payback-deposit-partial", is->exchange, + ("payback-deposit-partial", "payback-withdraw-coin-2a", 0, TALER_TESTING_make_wire_details (42, fakebank_url), @@ -825,7 +824,7 @@ run (void *cls, "EUR:0.5"), TALER_TESTING_cmd_deposit - ("payback-deposit-revoked", is->exchange, + ("payback-deposit-revoked", "payback-withdraw-coin-2b", 0, TALER_TESTING_make_wire_details (42, fakebank_url), @@ -840,7 +839,6 @@ run (void *cls, * 404 on the DK! */ TALER_TESTING_cmd_deposit ("payback-deposit-partial-after-payback", - is->exchange, "payback-withdraw-coin-2a", 0, TALER_TESTING_make_wire_details diff --git a/src/exchange-lib/test_exchange_api_twisted.c b/src/exchange-lib/test_exchange_api_twisted.c index 9e52c9ea7..cc5377c72 100644 --- a/src/exchange-lib/test_exchange_api_twisted.c +++ b/src/exchange-lib/test_exchange_api_twisted.c @@ -174,7 +174,6 @@ run (void *cls, TALER_TESTING_cmd_deposit ("refresh-deposit-partial", - is->exchange, "refresh-withdraw-coin", 0, TALER_TESTING_make_wire_details @@ -236,7 +235,6 @@ run (void *cls, TALER_TESTING_cmd_deposit ("deposit-refund-1", - is->exchange, "withdraw-coin-r1", 0, TALER_TESTING_make_wire_details @@ -280,7 +278,6 @@ run (void *cls, TALER_TESTING_cmd_deposit ("deposit-refund-to-fail", - is->exchange, "withdraw-coin-r1", 0, /* coin index. */ TALER_TESTING_make_wire_details diff --git a/src/exchange-lib/testing_api_cmd_deposit.c b/src/exchange-lib/testing_api_cmd_deposit.c index 18d409e23..d0cfd62da 100644 --- a/src/exchange-lib/testing_api_cmd_deposit.c +++ b/src/exchange-lib/testing_api_cmd_deposit.c @@ -87,11 +87,6 @@ struct DepositState */ struct TALER_TESTING_Interpreter *is; - /** - * Exchange connection. - */ - struct TALER_EXCHANGE_Handle *exchange; - /** * Task scheduled to try later. */ @@ -129,7 +124,6 @@ struct DepositState * deposit confirmation. */ struct TALER_ExchangeSignatureP exchange_sig; - }; @@ -363,7 +357,7 @@ deposit_run (void *cls, &coin_sig.eddsa_signature)); } ds->dh = TALER_EXCHANGE_deposit - (ds->exchange, + (is->exchange, &amount, wire_deadline, ds->wire_details, @@ -496,7 +490,6 @@ deposit_traits (void *cls, * Create a "deposit" command. * * @param label command label. - * @param exchange exchange connection. * @param coin_reference reference to any operation that can * provide a coin. * @param coin_index if @a withdraw_reference offers an array of @@ -518,7 +511,6 @@ deposit_traits (void *cls, struct TALER_TESTING_Command TALER_TESTING_cmd_deposit (const char *label, - struct TALER_EXCHANGE_Handle *exchange, const char *coin_reference, unsigned int coin_index, json_t *wire_details, @@ -531,7 +523,6 @@ TALER_TESTING_cmd_deposit struct DepositState *ds; ds = GNUNET_new (struct DepositState); - ds->exchange = exchange; ds->coin_reference = coin_reference; ds->coin_index = coin_index; ds->wire_details = wire_details; diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index 8c2b01f82..3058d4ce5 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -1016,7 +1016,6 @@ TALER_TESTING_cmd_status (const char *label, * Create a "deposit" command. * * @param label command label. - * @param exchange exchange connection. * @param coin_reference reference to any operation that can * provide a coin. * @param coin_index if @a withdraw_reference offers an array of @@ -1036,7 +1035,6 @@ TALER_TESTING_cmd_status (const char *label, struct TALER_TESTING_Command TALER_TESTING_cmd_deposit (const char *label, - struct TALER_EXCHANGE_Handle *exchange, const char *coin_reference, unsigned int coin_index, json_t *wire_details, -- cgit v1.2.3