Skip to content

Commit b8544dd

Browse files
committed
Expose script building gated with a new feature flag
1 parent 2e4e9a5 commit b8544dd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lightning/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Still missing tons of error-handling. See GitHub issues for suggested projects i
1212

1313
[features]
1414
fuzztarget = ["bitcoin/fuzztarget"]
15+
test_utils = []
16+
# Internal test utilities exposed to other repo crates
1517
_test_utils = ["hex", "regex"]
1618
# Unlog messages superior at targeted level.
1719
max_level_off = []

lightning/src/ln/chan_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ impl CommitmentTransaction {
910910
}
911911
}
912912

913-
#[cfg(feature = "_test_utils")]
913+
#[cfg(feature = "test_utils")]
914914
/// Get the transaction output scripts.
915915
///
916916
/// For debugging purposes, since only the hash is present in the actual transaction.
@@ -1007,17 +1007,17 @@ impl CommitmentTransaction {
10071007
});
10081008

10091009
let mut outputs = Vec::with_capacity(txouts.len());
1010-
#[cfg(feature = "_test_utils")]
1010+
#[cfg(feature = "test_utils")]
10111011
let mut scripts = Vec::new();
1012-
#[cfg(not(feature = "_test_utils"))]
1012+
#[cfg(not(feature = "test_utils"))]
10131013
let scripts = Vec::new();
10141014
for (idx, out) in txouts.drain(..).enumerate() {
10151015
if let Some(htlc) = (out.1).1 {
10161016
htlc.transaction_output_index = Some(idx as u32);
10171017
htlcs.push(htlc.clone());
10181018
}
10191019
outputs.push(out.0);
1020-
#[cfg(feature = "_test_utils")]
1020+
#[cfg(feature = "test_utils")]
10211021
scripts.push((out.1).0);
10221022
}
10231023
Ok((outputs, htlcs, scripts))

0 commit comments

Comments
 (0)