File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -4474,16 +4474,18 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
44744474 }
44754475 }
44764476
4477+ // Assume that if the updates contains no encoded channel, that the channel remained unchanged. We
4478+ // therefore do not update the monitor.
4479+ if let Some ( encoded_channel) = updates. encoded_channel . as_ref ( ) {
4480+ self . update_encoded_channel ( encoded_channel. clone ( ) ) ;
4481+ }
4482+
44774483 if ret. is_ok ( ) {
44784484 if self . no_further_updates_allowed ( ) && is_pre_close_update {
44794485 log_error ! ( logger, "Refusing Channel Monitor Update as counterparty attempted to update commitment after funding was spent" ) ;
44804486 Err ( ( ) )
44814487 } else {
4482- // Assume that if the updates contains no encoded channel, that the channel remained unchanged. We
4483- // therefore do not update the monitor.
4484- if let Some ( encoded_channel) = updates. encoded_channel . as_ref ( ) {
4485- self . update_encoded_channel ( encoded_channel. clone ( ) ) ;
4486- }
4488+
44874489 Ok ( ( ) )
44884490 }
44894491 } else { ret }
You can’t perform that action at this time.
0 commit comments