From: Matt Corallo Date: Mon, 19 Mar 2018 23:55:05 +0000 (-0400) Subject: Add dummy creator for PendingForwardHTLCInfo X-Git-Tag: v0.0.12~417^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=02b92f5d5c3340a2eeff9a6699a00d5ec3cad2e4;p=rust-lightning Add dummy creator for PendingForwardHTLCInfo --- diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index 3d70b1d37..0dddfdac6 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -42,6 +42,20 @@ 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). +impl PendingForwardHTLCInfo { + pub fn dummy() -> Self { + Self { + onion_packet: None, + payment_hash: [0; 32], + short_channel_id: 0, + prev_short_channel_id: 0, + amt_to_forward: 0, + outgoing_cltv_value: 0, + } + } +} enum PendingOutboundHTLC { IntermediaryHopData {