|
12 | 12 |
|
13 | 13 | use ln::channelmanager::{BREAKDOWN_TIMEOUT, MAX_LOCAL_BREAKDOWN_TIMEOUT};
|
14 | 14 |
|
15 |
| -/// Top-level config which holds ChannelHandshakeLimits and ChannelConfig. |
16 |
| -/// |
17 |
| -/// Default::default() provides sane defaults for most configurations |
18 |
| -/// (but currently with 0 relay fees!) |
19 |
| -#[derive(Clone, Debug)] |
20 |
| -pub struct UserConfig { |
21 |
| - /// Channel config that we propose to our counterparty. |
22 |
| - pub own_channel_config: ChannelHandshakeConfig, |
23 |
| - /// Limits applied to our counterparty's proposed channel config settings. |
24 |
| - pub peer_channel_config_limits: ChannelHandshakeLimits, |
25 |
| - /// Channel config which affects behavior during channel lifetime. |
26 |
| - pub channel_options: ChannelConfig, |
27 |
| -} |
28 |
| - |
29 |
| -impl Default for UserConfig { |
30 |
| - fn default() -> Self { |
31 |
| - UserConfig { |
32 |
| - own_channel_config: ChannelHandshakeConfig::default(), |
33 |
| - peer_channel_config_limits: ChannelHandshakeLimits::default(), |
34 |
| - channel_options: ChannelConfig::default(), |
35 |
| - } |
36 |
| - } |
37 |
| -} |
38 |
| - |
39 | 15 | /// Configuration we set when applicable.
|
40 | 16 | ///
|
41 | 17 | /// Default::default() provides sane defaults.
|
@@ -228,3 +204,27 @@ impl_writeable!(ChannelConfig, 8+1+1, {
|
228 | 204 | announced_channel,
|
229 | 205 | commit_upfront_shutdown_pubkey
|
230 | 206 | });
|
| 207 | + |
| 208 | +/// Top-level config which holds ChannelHandshakeLimits and ChannelConfig. |
| 209 | +/// |
| 210 | +/// Default::default() provides sane defaults for most configurations |
| 211 | +/// (but currently with 0 relay fees!) |
| 212 | +#[derive(Clone, Debug)] |
| 213 | +pub struct UserConfig { |
| 214 | + /// Channel config that we propose to our counterparty. |
| 215 | + pub own_channel_config: ChannelHandshakeConfig, |
| 216 | + /// Limits applied to our counterparty's proposed channel config settings. |
| 217 | + pub peer_channel_config_limits: ChannelHandshakeLimits, |
| 218 | + /// Channel config which affects behavior during channel lifetime. |
| 219 | + pub channel_options: ChannelConfig, |
| 220 | +} |
| 221 | + |
| 222 | +impl Default for UserConfig { |
| 223 | + fn default() -> Self { |
| 224 | + UserConfig { |
| 225 | + own_channel_config: ChannelHandshakeConfig::default(), |
| 226 | + peer_channel_config_limits: ChannelHandshakeLimits::default(), |
| 227 | + channel_options: ChannelConfig::default(), |
| 228 | + } |
| 229 | + } |
| 230 | +} |
0 commit comments