refactor: move-only: move `FeeEstimateMode` enum to `util/fees.h`
What changed, and why it matters
This commit is a simple code reorganization: it moves an existing list of fee-estimation options (the FeeEstimateMode enum) from one header file to another, without changing any values, logic, or behavior. There is no security issue here.
No action required; this is a benign refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is a move-only refactor. The FeeEstimateMode enum is removed from src/policy/feerate.h and placed into a new header src/util/fees.h, which is then included by feerate.h. The enum values, comments, and semantics are identical. No functional code is modified.
Changed components
src/policy/feerate.hsrc/util/fees.hInspect captured patch +18 / −10
diff --git a/src/policy/feerate.h b/src/policy/feerate.h
index 5994fe99..b89f2e1e 100644
--- a/src/policy/feerate.h
+++ b/src/policy/feerate.h
@@ -9,6 +9,7 @@
#include <consensus/amount.h>
#include <serialize.h>
#include <util/feefrac.h>
+#include <util/fees.h>
#include <cstdint>
@@ -17,16 +18,6 @@
const std::string CURRENCY_UNIT = "BTC"; // One formatted unit
const std::string CURRENCY_ATOM = "sat"; // One indivisible minimum value unit
-
-/* Used to determine type of fee estimation requested */
-enum class FeeEstimateMode {
- UNSET, //!< Use default settings based on other criteria
- ECONOMICAL, //!< Force estimateSmartFee to use non-conservative estimates
- CONSERVATIVE, //!< Force estimateSmartFee to use conservative estimates
- BTC_KVB, //!< Use BTC/kvB fee rate unit
- SAT_VB, //!< Use sat/vB fee rate unit
-};
-
/**
* Fee rate in satoshis per virtualbyte: CAmount / vB
* the feerate is represented internally as FeeFrac
diff --git a/src/util/fees.h b/src/util/fees.h
new file mode 100644
index 00000000..25ca246e
--- /dev/null
+++ b/src/util/fees.h
@@ -0,0 +1,17 @@
+// Copyright (c) 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_UTIL_FEES_H
+#define BITCOIN_UTIL_FEES_H
+
+/* Used to determine type of fee estimation requested */
+enum class FeeEstimateMode {
+ UNSET, //!< Use default settings based on other criteria
+ ECONOMICAL, //!< Force estimateSmartFee to use non-conservative estimates
+ CONSERVATIVE, //!< Force estimateSmartFee to use conservative estimates
+ BTC_KVB, //!< Use BTC/kvB fee rate unit
+ SAT_VB, //!< Use sat/vB fee rate unit
+};
+
+#endif // BITCOIN_UTIL_FEES_H
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.