Skip to content

Commit 187ca8c

Browse files
committed
Make Channel non-public except in fuzztarget mode, bump version
1 parent cf6308a commit 187ca8c

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning"
3-
version = "0.0.1"
3+
version = "0.0.2"
44
authors = ["Matt Corallo"]
55
license = "Apache-2.0"
66
repository = "https://github.com/TheBlueMatt/rust-lightning/"

src/ln/channelmanager.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ pub struct PendingForwardHTLCInfo {
4141
amt_to_forward: u64,
4242
outgoing_cltv_value: u32,
4343
}
44-
//TODO: This is public, and needed to call Channel::update_add_htlc, so there needs to be a way to
45-
//initialize it usefully...probably make it optional in Channel instead).
44+
45+
#[cfg(feature = "fuzztarget")]
4646
impl PendingForwardHTLCInfo {
4747
pub fn dummy() -> Self {
4848
Self {
@@ -635,7 +635,7 @@ impl ChannelManager {
635635
let mut channel_state_lock = self.channel_state.lock().unwrap();
636636
let channel_state = channel_state_lock.borrow_parts();
637637

638-
if Instant::now() < *channel_state.next_forward {
638+
if cfg!(not(feature = "fuzztarget")) && Instant::now() < *channel_state.next_forward {
639639
return;
640640
}
641641

src/ln/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
pub mod channelmanager;
2-
pub mod channel;
32
pub mod channelmonitor;
43
pub mod msgs;
54
pub mod router;
65
pub mod peer_channel_encryptor;
76
pub mod peer_handler;
87

8+
#[cfg(feature = "fuzztarget")]
9+
pub mod channel;
10+
#[cfg(not(feature = "fuzztarget"))]
11+
pub(crate) mod channel;
12+
913
mod chan_utils;

0 commit comments

Comments
 (0)