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 @@ -2203,9 +2203,9 @@ impl<Signer: Sign> Channel<Signer> {
2203
2203
} else {
2204
2204
// If they have sent updated points, funding_locked is always supposed to match
2205
2205
// their "first" point, which we re-derive here.
2206
- self . commitment_secrets . get_secret ( INITIAL_COMMITMENT_NUMBER - 1 )
2207
- . map ( |secret| SecretKey :: from_slice ( & secret ) . ok ( ) ) . flatten ( )
2208
- . map ( |sk| PublicKey :: from_secret_key ( & self . secp_ctx , & sk ) )
2206
+ Some ( PublicKey :: from_secret_key ( & self . secp_ctx , & SecretKey :: from_slice (
2207
+ & self . commitment_secrets . get_secret ( INITIAL_COMMITMENT_NUMBER - 1 ) . expect ( "We should have all prev secrets available" )
2208
+ ) . expect ( "We already advanced, so previous secret keys should have been validated already" ) ) )
2209
2209
} ;
2210
2210
if expected_point != Some ( msg. next_per_commitment_point ) {
2211
2211
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