X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fln%2Fchannelmanager.rs;h=ff78a27df58b3243979758af8ba8889e36b63e01;hb=f7dd69240afcd3a0087f7796824a9e2697ed85cf;hp=8be2348a7e1e5374ba82bc063a3c7ac25a668bb8;hpb=8e79c05a2045f7c3c32365937db8866031172c7f;p=rust-lightning diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index 8be2348a..ff78a27d 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -41,8 +41,8 @@ pub struct PendingForwardHTLCInfo { amt_to_forward: u64, outgoing_cltv_value: u32, } -//TODO: This is public, and needed to call Channel::update_add_htlc, so there needs to be a way to -//initialize it usefully...probably make it optional in Channel instead). + +#[cfg(feature = "fuzztarget")] impl PendingForwardHTLCInfo { pub fn dummy() -> Self { Self { @@ -635,7 +635,7 @@ impl ChannelManager { let mut channel_state_lock = self.channel_state.lock().unwrap(); let channel_state = channel_state_lock.borrow_parts(); - if Instant::now() < *channel_state.next_forward { + if cfg!(not(feature = "fuzztarget")) && Instant::now() < *channel_state.next_forward { return; }