File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2193,9 +2193,9 @@ impl<Signer: Sign> Channel<Signer> {
2193
2193
} else {
2194
2194
// If they have sent updated points, funding_locked is always supposed to match
2195
2195
// their "first" point, which we re-derive here.
2196
- self . commitment_secrets . get_secret ( INITIAL_COMMITMENT_NUMBER - 1 )
2197
- . map ( |secret| SecretKey :: from_slice ( & secret ) . ok ( ) ) . flatten ( )
2198
- . map ( |sk| PublicKey :: from_secret_key ( & self . secp_ctx , & sk ) )
2196
+ Some ( PublicKey :: from_secret_key ( & self . secp_ctx , & SecretKey :: from_slice (
2197
+ & self . commitment_secrets . get_secret ( INITIAL_COMMITMENT_NUMBER - 1 ) . expect ( "We should have all prev secrets available" )
2198
+ ) . expect ( "We already advanced, so previous secret keys should have been validated already" ) ) )
2199
2199
} ;
2200
2200
if expected_point != Some ( msg. next_per_commitment_point ) {
2201
2201
return Err ( ChannelError :: Close ( "Peer sent a reconnect funding_locked with a different point" . to_owned ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments