From: Matt Corallo Date: Tue, 30 Oct 2018 00:21:47 +0000 (-0400) Subject: Add warnings reminding users to use SegWit funding inputs X-Git-Tag: v0.0.12~278^2~8 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=11776dbb63674cf394fe439c97f0cad7547032a4;p=rust-lightning Add warnings reminding users to use SegWit funding inputs --- diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index ed69e8a03..d1e8eefd4 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -1233,6 +1233,9 @@ impl ChannelManager { /// Call this upon creation of a funding transaction for the given channel. /// + /// Note that ALL inputs in the transaction pointed to by funding_txo MUST spend SegWit outputs + /// or your counterparty can steal your funds! + /// /// Panics if a funding transaction has already been provided for this channel. /// /// May panic if the funding_txo is duplicative with some other channel (note that this should diff --git a/src/util/events.rs b/src/util/events.rs index 37cee2ede..a9a7d06fe 100644 --- a/src/util/events.rs +++ b/src/util/events.rs @@ -27,6 +27,8 @@ pub enum Event { /// Used to indicate that the client should generate a funding transaction with the given /// parameters and then call ChannelManager::funding_transaction_generated. /// Generated in ChannelManager message handling. + /// Note that *all inputs* in the funding transaction must spend SegWit outputs or your + /// counterparty can steal your funds! FundingGenerationReady { /// The random channel_id we picked which you'll need to pass into /// ChannelManager::funding_transaction_generated.