aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/json.h
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-02-01 11:36:49 +0000
committerfanquake <fanquake@gmail.com>2023-02-01 11:43:42 +0000
commit17acbc1a5a8d07ad30fc0ef4a726097f5cf9e168 (patch)
tree0d6ec693c011d235bf19888eb48df3adc550f496 /src/test/util/json.h
parente1bf5470f919cf212703466411968916db8ae61f (diff)
parent7a820cee0e6408f5848799011d82dd29ee7fa8c5 (diff)
Merge bitcoin/bitcoin#25974: test, build: Separate `read_json` function into its own module
7a820cee0e6408f5848799011d82dd29ee7fa8c5 test, build: Separate `read_json` function into its own module (Hennadii Stepanov) Pull request description: Currently, 4 source files rely on the definition of the `read_json` function provided in `src/test/script_tests.cpp`. This PR breaks this entanglement, improves code structure and maintainability. ACKs for top commit: fanquake: ACK 7a820cee0e6408f5848799011d82dd29ee7fa8c5 Tree-SHA512: f1567989f76cb54ab86cc48927851a8c424b08a9483d02d4918b629e0c792108bad4ccf7fa341d57b0921d91e84bf8fa3b9c07e5fdf12c64d9d5da83e4e464fb
Diffstat (limited to 'src/test/util/json.h')
-rw-r--r--src/test/util/json.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/util/json.h b/src/test/util/json.h
new file mode 100644
index 0000000000..5b1026762e
--- /dev/null
+++ b/src/test/util/json.h
@@ -0,0 +1,14 @@
+// Copyright (c) 2023 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_TEST_UTIL_JSON_H
+#define BITCOIN_TEST_UTIL_JSON_H
+
+#include <string>
+
+#include <univalue.h>
+
+UniValue read_json(const std::string& jsondata);
+
+#endif // BITCOIN_TEST_UTIL_JSON_H