diff options
Diffstat (limited to 'src/include/taler_fakebank_lib.h')
-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()). |