From 02b92f5d5c3340a2eeff9a6699a00d5ec3cad2e4 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 19 Mar 2018 19:55:05 -0400 Subject: [PATCH] Add dummy creator for PendingForwardHTLCInfo --- src/ln/channelmanager.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index 3d70b1d3..0dddfdac 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 { -- 2.30.2