Skip to content

Commit 02b92f5

Browse files
committed
Add dummy creator for PendingForwardHTLCInfo
1 parent ab56b81 commit 02b92f5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/ln/channelmanager.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ pub struct PendingForwardHTLCInfo {
4242
amt_to_forward: u64,
4343
outgoing_cltv_value: u32,
4444
}
45+
//TODO: This is public, and needed to call Channel::update_add_htlc, so there needs to be a way to
46+
//initialize it usefully...probably make it optional in Channel instead).
47+
impl PendingForwardHTLCInfo {
48+
pub fn dummy() -> Self {
49+
Self {
50+
onion_packet: None,
51+
payment_hash: [0; 32],
52+
short_channel_id: 0,
53+
prev_short_channel_id: 0,
54+
amt_to_forward: 0,
55+
outgoing_cltv_value: 0,
56+
}
57+
}
58+
}
4559

4660
enum PendingOutboundHTLC {
4761
IntermediaryHopData {

0 commit comments

Comments
 (0)