aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2023-12-06 16:43:49 -0500
committerRyan Ofsky <ryan@ofsky.org>2024-05-16 10:16:08 -0500
commit680eafdc74021c1e0893c3a62404e607fd4724f5 (patch)
treed1fe7bb7ad81db88b38d5af9081a0e5561ed9a11 /src/test
parent02e62c6c9af4beabaeea58fb1ea3ad0dc5094678 (diff)
util: move fees.h and error.h to common/messages.h
Move enum and message formatting functions to a common/messages header where they should be more discoverable, and also out of the util library, so they will not be a dependency of the kernel The are no changes in behavior and no changes to the moved code.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/fees.cpp4
-rw-r--r--src/test/fuzz/kitchen_sink.cpp4
-rw-r--r--src/test/fuzz/string.cpp8
3 files changed, 12 insertions, 4 deletions
diff --git a/src/test/fuzz/fees.cpp b/src/test/fuzz/fees.cpp
index 38a8c6798e..5c760be13d 100644
--- a/src/test/fuzz/fees.cpp
+++ b/src/test/fuzz/fees.cpp
@@ -2,17 +2,19 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <common/messages.h>
#include <consensus/amount.h>
#include <policy/fees.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
-#include <util/fees.h>
#include <cstdint>
#include <string>
#include <vector>
+using common::StringForFeeReason;
+
FUZZ_TARGET(fees)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
diff --git a/src/test/fuzz/kitchen_sink.cpp b/src/test/fuzz/kitchen_sink.cpp
index 42a6b316c3..3bfffba773 100644
--- a/src/test/fuzz/kitchen_sink.cpp
+++ b/src/test/fuzz/kitchen_sink.cpp
@@ -2,13 +2,13 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <common/messages.h>
#include <merkleblock.h>
#include <policy/fees.h>
#include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
-#include <util/error.h>
#include <util/translation.h>
#include <array>
@@ -16,6 +16,8 @@
#include <optional>
#include <vector>
+using common::TransactionErrorString;
+
namespace {
constexpr TransactionError ALL_TRANSACTION_ERROR[] = {
TransactionError::MISSING_INPUTS,
diff --git a/src/test/fuzz/string.cpp b/src/test/fuzz/string.cpp
index 631da13803..5b1353c70b 100644
--- a/src/test/fuzz/string.cpp
+++ b/src/test/fuzz/string.cpp
@@ -5,6 +5,7 @@
#include <blockfilter.h>
#include <clientversion.h>
#include <common/args.h>
+#include <common/messages.h>
#include <common/settings.h>
#include <common/system.h>
#include <common/url.h>
@@ -21,8 +22,6 @@
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
-#include <util/error.h>
-#include <util/fees.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/translation.h>
@@ -37,6 +36,11 @@
enum class FeeEstimateMode;
+using common::AmountErrMsg;
+using common::AmountHighWarn;
+using common::FeeModeFromString;
+using common::ResolveErrMsg;
+
FUZZ_TARGET(string)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());