X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Futil%2Fconfig.rs;h=e1a7e59727cc14d0f6cb9c1ca545b91ead628bae;hb=4769b944de50f3819b4252353345009b1d810e90;hp=f3b574b93fba6c40389761994cb92cddb1b3480a;hpb=675cf4ac1d02b2b558a0e041d6cd4bebac0e5108;p=rust-lightning diff --git a/src/util/config.rs b/src/util/config.rs index f3b574b9..e1a7e597 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -129,6 +129,14 @@ pub struct ChannelConfig { /// /// This cannot be changed after the initial channel handshake. pub announced_channel: bool, + /// Set to commit to an upfront shutdown_pubkey at channel opening. In case of mutual + /// closing, the other peer will check that our closing transction output is encumbered + /// by the provided script. + /// + /// We set it by default as this ensure greater security to the user funds. + /// + /// This cannot be changed after channel opening. + pub commit_upfront_shutdown_pubkey: bool } impl ChannelConfig { @@ -137,12 +145,14 @@ impl ChannelConfig { ChannelConfig { fee_proportional_millionths: 0, announced_channel: false, + commit_upfront_shutdown_pubkey: true, } } } //Add write and readable traits to channelconfig -impl_writeable!(ChannelConfig, 8+1, { +impl_writeable!(ChannelConfig, 8+1+1, { fee_proportional_millionths, - announced_channel + announced_channel, + commit_upfront_shutdown_pubkey });