Trivial: use full path in test macros
What changed, and why it matters
This is a minor code cleanup change inside test helper macros. It replaces short internal names like `_reload_node` with fully qualified paths such as `$crate::ln::functional_test_utils::_reload_node`. This only affects how test macros resolve symbols when reused in other test crates; it does not change runtime behavior, user-facing APIs, or any security-sensitive logic.
No security action required. Treat as a normal test infrastructure refactoring commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies five macro definitions in lightning/src/ln/functional_test_utils.rs to use $crate::... fully qualified paths when calling other macros or helper functions. This is a standard Rust macro hygiene practice that ensures the macros work correctly when invoked from external test crates (e.g., lightning-tests/upgrade_downgrade_tests). The change is purely syntactic/scoping and does not alter control flow, cryptographic operations, network handling, or state machine behavior.
Changed components
lightning/src/ln/functional_test_utils.rs test macrosInspect captured patch +5 / −5
diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs
index a546115..d5a2978 100644
--- a/lightning/src/ln/functional_test_utils.rs
+++ b/lightning/src/ln/functional_test_utils.rs
@@ -1383,7 +1383,7 @@ macro_rules! _reload_node_inner {
);
$node.chain_monitor = &$new_chain_monitor;
- $new_channelmanager = _reload_node(
+ $new_channelmanager = $crate::ln::functional_test_utils::_reload_node(
&$node,
$new_config,
&chanman_encoded,
@@ -1401,7 +1401,7 @@ macro_rules! reload_node {
// Reload the node using the node's current config
($node: expr, $chanman_encoded: expr, $monitors_encoded: expr, $persister: ident, $new_chain_monitor: ident, $new_channelmanager: ident) => {
let config = $node.node.get_current_config();
- _reload_node_inner!(
+ $crate::_reload_node_inner!(
$node,
config,
$chanman_encoded,
@@ -1414,7 +1414,7 @@ macro_rules! reload_node {
};
// Reload the node with the new provided config
($node: expr, $new_config: expr, $chanman_encoded: expr, $monitors_encoded: expr, $persister: ident, $new_chain_monitor: ident, $new_channelmanager: ident) => {
- _reload_node_inner!(
+ $crate::_reload_node_inner!(
$node,
$new_config,
$chanman_encoded,
@@ -1431,7 +1431,7 @@ macro_rules! reload_node {
ident, $new_chain_monitor: ident, $new_channelmanager: ident, $reconstruct_pending_htlcs: expr
) => {
let config = $node.node.get_current_config();
- _reload_node_inner!(
+ $crate::_reload_node_inner!(
$node,
config,
$chanman_encoded,
@@ -2971,7 +2971,7 @@ pub fn check_payment_claimable(
#[cfg(any(test, ldk_bench, feature = "_test_utils"))]
macro_rules! expect_payment_claimable {
($node: expr, $expected_payment_hash: expr, $expected_payment_secret: expr, $expected_recv_value: expr) => {
- expect_payment_claimable!(
+ $crate::expect_payment_claimable!(
$node,
$expected_payment_hash,
$expected_payment_secret,
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.