X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Futil%2Fconfig.rs;h=c3726365996ae5b5cff69448aeb33c766ce82b54;hb=4395b92cc8bfe0cc803e70bba11f4db58d5d0dbf;hp=3c4ab77c16bc1d921d6057c21bb620fe410dce68;hpb=821357ea61c4f636720ebe2b75a8c027b7009521;p=rust-lightning diff --git a/lightning/src/util/config.rs b/lightning/src/util/config.rs index 3c4ab77c..c3726365 100644 --- a/lightning/src/util/config.rs +++ b/lightning/src/util/config.rs @@ -1,3 +1,12 @@ +// This file is Copyright its original authors, visible in version control +// history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license +// , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. + //! Various user-configurable channel limits and settings which ChannelManager //! applies for you. @@ -51,6 +60,14 @@ pub struct ChannelHandshakeConfig { /// Default value: BREAKDOWN_TIMEOUT (currently 144), we enforce it as a minimum at channel /// opening so you can tweak config to ask for more security, not less. pub our_to_self_delay: u16, + /// Set to the smallest value HTLC we will accept to process. + /// + /// This value is sent to our counterparty on channel-open and we close the channel any time + /// our counterparty misbehaves by sending us an HTLC with a value smaller than this. + /// + /// Default value: 1. If the value is less than 1, it is ignored and set to 1, as is required + /// by the protocol. + pub our_htlc_minimum_msat: u64, } impl Default for ChannelHandshakeConfig { @@ -58,6 +75,7 @@ impl Default for ChannelHandshakeConfig { ChannelHandshakeConfig { minimum_depth: 6, our_to_self_delay: BREAKDOWN_TIMEOUT, + our_htlc_minimum_msat: 1, } } }