File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,13 @@ impl LocalFeatures {
63
63
#[ cfg( not( feature = "fuzztarget" ) ) ]
64
64
pub ( crate ) fn new ( ) -> LocalFeatures {
65
65
LocalFeatures {
66
- flags : vec ! [ 1 << 4 ] ,
66
+ flags : vec ! [ 1 << 5 ] ,
67
67
}
68
68
}
69
69
#[ cfg( feature = "fuzztarget" ) ]
70
70
pub fn new ( ) -> LocalFeatures {
71
71
LocalFeatures {
72
- flags : vec ! [ 1 << 4 ] ,
72
+ flags : vec ! [ 1 << 5 ] ,
73
73
}
74
74
}
75
75
@@ -96,7 +96,7 @@ impl LocalFeatures {
96
96
}
97
97
#[ cfg( test) ]
98
98
pub ( crate ) fn unset_upfront_shutdown_script ( & mut self ) {
99
- self . flags [ 0 ] ^= 1 << 4 ;
99
+ self . flags [ 0 ] ^= 1 << 5 ;
100
100
}
101
101
102
102
pub ( crate ) fn requires_unknown_bits ( & self ) -> bool {
@@ -2018,9 +2018,9 @@ mod tests {
2018
2018
target_value. append ( & mut hex:: decode ( "0000" ) . unwrap ( ) ) ;
2019
2019
}
2020
2020
if initial_routing_sync {
2021
- target_value. append ( & mut hex:: decode ( "000118 " ) . unwrap ( ) ) ;
2021
+ target_value. append ( & mut hex:: decode ( "000128 " ) . unwrap ( ) ) ;
2022
2022
} else {
2023
- target_value. append ( & mut hex:: decode ( "000110 " ) . unwrap ( ) ) ;
2023
+ target_value. append ( & mut hex:: decode ( "000120 " ) . unwrap ( ) ) ;
2024
2024
}
2025
2025
assert_eq ! ( encoded_value, target_value) ;
2026
2026
}
Original file line number Diff line number Diff line change @@ -152,13 +152,15 @@ pub struct ChannelConfig {
152
152
///
153
153
/// This cannot be changed after the initial channel handshake.
154
154
pub announced_channel : bool ,
155
- /// Set to commit to an upfront shutdown_pubkey at channel opening. In case of mutual
156
- /// closing, the other peer will check that our closing transction output is encumbered
157
- /// by the provided script .
155
+ /// When set, we commit to an upfront shutdown_pubkey at channel open. If our counterparty
156
+ /// supports it, they will then enforce the mutual-close output to us matches what we provided
157
+ /// at intialization, preventing us from closing to an alternate pubkey .
158
158
///
159
- /// We set it by default as this ensure greater security to the user funds.
159
+ /// This is set to true by default to provide a slight increase in security, though ultimately
160
+ /// any attacker who is able to take control of a channel can just as easily send the funds via
161
+ /// lightning payments, so we never require that our counterparties support this option.
160
162
///
161
- /// This cannot be changed after channel opening .
163
+ /// This cannot be changed after a channel has been initialized .
162
164
pub commit_upfront_shutdown_pubkey : bool
163
165
}
164
166
You can’t perform that action at this time.
0 commit comments