Skip to content

Commit c557b82

Browse files
authored
Merge pull request lightningdevkit#9 from lightsparkdev/waterson/dont-panic-gossip
Don't panic if we can't sign a gossip message.
2 parents 0affb0f + d47cd5f commit c557b82

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3110,11 +3110,17 @@ where
31103110
fee_proportional_millionths: chan.context.get_fee_proportional_millionths(),
31113111
excess_data: Vec::new(),
31123112
};
3113+
3114+
// TODO(waterson): disabled this so that things work; not sure how to upstream.
31133115
// Panic on failure to signal LDK should be restarted to retry signing the `ChannelUpdate`.
31143116
// If we returned an error and the `node_signer` cannot provide a signature for whatever
31153117
// reason`, we wouldn't be able to receive inbound payments through the corresponding
31163118
// channel.
3117-
let sig = self.node_signer.sign_gossip_message(msgs::UnsignedGossipMessage::ChannelUpdate(&unsigned)).unwrap();
3119+
let sig = self.node_signer.sign_gossip_message(msgs::UnsignedGossipMessage::ChannelUpdate(&unsigned))
3120+
.map_err(|_| LightningError {
3121+
err: "Could not sign channel announcement".to_owned(),
3122+
action: msgs::ErrorAction::IgnoreError,
3123+
})?;
31183124

31193125
Ok(msgs::ChannelUpdate {
31203126
signature: sig,

0 commit comments

Comments
 (0)