scripted-diff: fix leftover references to `policy/fees.h`
What changed, and why it matters
This commit is a simple cleanup: it updates comments and documentation strings that still pointed to an old file path (`policy/fees.h`) after that file was apparently moved or split. The actual code behavior does not change at all. There is no security issue here.
No action required. This is a non-functional documentation/comment cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A scripted-diff commit that globally replaces the string policy/fees.h with policy/fees/block_policy_estimator.h in one C++ source file and five Python functional tests. All changes are inside comments or docstrings. No executable logic, constants, validation bounds, or interfaces are modified.
Changed components
src/wallet/rpc/spend.cpp (comment only)test/functional/rpc_estimatefee.py (comment only)test/functional/rpc_psbt.py (comment only)test/functional/wallet_basic.py (comment only)test/functional/wallet_fundrawtransaction.py (comment only)test/functional/wallet_send.py (comment only)Inspect captured patch +6 / −6
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp
index d00547a8..d765dc11 100644
--- a/src/wallet/rpc/spend.cpp
+++ b/src/wallet/rpc/spend.cpp
@@ -203,7 +203,7 @@ UniValue SendMoney(CWallet& wallet, const CCoinControl &coin_control, std::vecto
*
* @param[in] wallet Wallet reference
* @param[in,out] cc Coin control to be updated
- * @param[in] conf_target UniValue integer; confirmation target in blocks, values between 1 and 1008 are valid per policy/fees.h;
+ * @param[in] conf_target UniValue integer; confirmation target in blocks, values between 1 and 1008 are valid per policy/fees/block_policy_estimator.h;
* @param[in] estimate_mode UniValue string; fee estimation mode, valid values are "unset", "economical" or "conservative";
* @param[in] fee_rate UniValue real; fee rate in sat/vB;
* if present, both conf_target and estimate_mode must either be null, or "unset"
diff --git a/test/functional/rpc_estimatefee.py b/test/functional/rpc_estimatefee.py
index 2b877226..9346a000 100755
--- a/test/functional/rpc_estimatefee.py
+++ b/test/functional/rpc_estimatefee.py
@@ -36,7 +36,7 @@ class EstimateFeeTest(BitcoinTestFramework):
assert_raises_rpc_error(-1, "estimatesmartfee", self.nodes[0].estimatesmartfee, 1, 'ECONOMICAL', 1)
assert_raises_rpc_error(-1, "estimaterawfee", self.nodes[0].estimaterawfee, 1, 1, 1)
- # max value of 1008 per src/policy/fees.h
+ # max value of 1008 per src/policy/fees/block_policy_estimator.h
assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", self.nodes[0].estimaterawfee, 1009)
# valid calls
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index 933e4cd1..5acaaa71 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -601,7 +601,7 @@ class PSBTTest(BitcoinTestFramework):
assert_raises_rpc_error(-3, f"JSON value of type {k} for field conf_target is not of expected type number",
self.nodes[1].walletcreatefundedpsbt, inputs, outputs, 0, {"estimate_mode": mode, "conf_target": v, "add_inputs": True})
for n in [-1, 0, 1009]:
- assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", # max value of 1008 per src/policy/fees.h
+ assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", # max value of 1008 per src/policy/fees/block_policy_estimator.h
self.nodes[1].walletcreatefundedpsbt, inputs, outputs, 0, {"estimate_mode": mode, "conf_target": n, "add_inputs": True})
self.log.info("Test walletcreatefundedpsbt with too-high fee rate produces total fee well above -maxtxfee and raises RPC error")
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py
index d700bf94..34ecf760 100755
--- a/test/functional/wallet_basic.py
+++ b/test/functional/wallet_basic.py
@@ -334,7 +334,7 @@ class WalletTest(BitcoinTestFramework):
self.log.info("Test sendmany raises if an invalid conf_target or estimate_mode is passed")
for target, mode in product([-1, 0, 1009], ["economical", "conservative"]):
- assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", # max value of 1008 per src/policy/fees.h
+ assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", # max value of 1008 per src/policy/fees/block_policy_estimator.h
self.nodes[2].sendmany, amounts={address: 1}, conf_target=target, estimate_mode=mode)
for target, mode in product([-1, 0], ["btc/kb", "sat/b"]):
assert_raises_rpc_error(-8, 'Invalid estimate_mode parameter, must be one of: "unset", "economical", "conservative"',
diff --git a/test/functional/wallet_fundrawtransaction.py b/test/functional/wallet_fundrawtransaction.py
index 7cf92876..c6fd83bd 100755
--- a/test/functional/wallet_fundrawtransaction.py
+++ b/test/functional/wallet_fundrawtransaction.py
@@ -848,7 +848,7 @@ class RawTransactionsTest(BitcoinTestFramework):
assert_raises_rpc_error(-3, f"JSON value of type {k} for field conf_target is not of expected type number",
node.fundrawtransaction, rawtx, estimate_mode=mode, conf_target=v, add_inputs=True)
for n in [-1, 0, 1009]:
- assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", # max value of 1008 per src/policy/fees.h
+ assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", # max value of 1008 per src/policy/fees/block_policy_estimator.h
node.fundrawtransaction, rawtx, estimate_mode=mode, conf_target=n, add_inputs=True)
self.log.info("Test invalid fee rate settings")
diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py
index 1316aecb..fef2088e 100755
--- a/test/functional/wallet_send.py
+++ b/test/functional/wallet_send.py
@@ -312,7 +312,7 @@ class WalletSendTest(BitcoinTestFramework):
for target, mode in product([-1, 0, 1009], ["economical", "conservative"]):
self.test_send(from_wallet=w0, to_wallet=w1, amount=1, conf_target=target, estimate_mode=mode,
- expect_error=(-8, "Invalid conf_target, must be between 1 and 1008")) # max value of 1008 per src/policy/fees.h
+ expect_error=(-8, "Invalid conf_target, must be between 1 and 1008")) # max value of 1008 per src/policy/fees/block_policy_estimator.h
msg = 'Invalid estimate_mode parameter, must be one of: "unset", "economical", "conservative"'
for target, mode in product([-1, 0], ["btc/kb", "sat/b"]):
self.test_send(from_wallet=w0, to_wallet=w1, amount=1, conf_target=target, estimate_mode=mode, expect_error=(-8, msg))
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.