diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-06-19 05:00:45 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-06-19 05:00:45 +0200 |
commit | 036e7117798246b04fb5d8cbf274abf3b04ddbd3 (patch) | |
tree | 66daf0dd6c543010bd5dfe1dd6abbc3bef8e4477 /src/include | |
parent | 6680f9b4ef37db66880d774d7dc9f97e7d639f13 (diff) | |
download | exchange-036e7117798246b04fb5d8cbf274abf3b04ddbd3.tar.xz |
extend fakebank API to have thread pool option
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_fakebank_lib.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/include/taler_fakebank_lib.h b/src/include/taler_fakebank_lib.h index abef2de52..828282c8b 100644 --- a/src/include/taler_fakebank_lib.h +++ b/src/include/taler_fakebank_lib.h @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2016-2020 Taler Systems SA + (C) 2016-2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -53,6 +53,29 @@ TALER_FAKEBANK_start (uint16_t port, /** + * Start the fake bank. The fake bank will, like the normal bank, listen for + * requests for /admin/add/incoming and /transfer. However, instead of + * executing or storing those requests, it will simply allow querying whether + * such a request has been made via #TALER_FAKEBANK_check_debit() and + * #TALER_FAKEBANK_check_credit() as well as the history API. + * + * This is useful for writing testcases to check whether the exchange + * would have issued the correct wire transfer orders. + * + * @param port port to listen to + * @param currency which currency should the bank offer + * @param num_threads size of the thread pool, 0 to use the GNUnet scheduler + * @param close_connections true to force closing a connection after each request (no HTTP keep-alive) + * @return NULL on error + */ +struct TALER_FAKEBANK_Handle * +TALER_FAKEBANK_start2 (uint16_t port, + const char *currency, + unsigned int num_threads, + bool close_connections); + + +/** * Check that no wire transfers were ordered (or at least none * that have not been taken care of via #TALER_FAKEBANK_check_debit() * or #TALER_FAKEBANK_check_credit()). |