summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-06-19 05:00:45 +0200
committerChristian Grothoff <christian@grothoff.org>2021-06-19 05:00:45 +0200
commit036e7117798246b04fb5d8cbf274abf3b04ddbd3 (patch)
tree66daf0dd6c543010bd5dfe1dd6abbc3bef8e4477 /src/include
parent6680f9b4ef37db66880d774d7dc9f97e7d639f13 (diff)
downloadexchange-036e7117798246b04fb5d8cbf274abf3b04ddbd3.tar.gz
exchange-036e7117798246b04fb5d8cbf274abf3b04ddbd3.tar.bz2
exchange-036e7117798246b04fb5d8cbf274abf3b04ddbd3.zip
extend fakebank API to have thread pool option
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_fakebank_lib.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/include/taler_fakebank_lib.h b/src/include/taler_fakebank_lib.h
index abef2de5..828282c8 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()).