Skip to content

Commit ebea671

Browse files
committed
fix Use try_channel_entry macro in some error branches
1 parent c1e5c3f commit ebea671

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9350,7 +9350,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
93509350
});
93519351
},
93529352
Err(err) => {
9353-
return Err(MsgHandleErrInternal::from_chan_no_close(err, msg.channel_id));
9353+
try_channel_entry!(self, peer_state, Err(err), chan_entry)
93549354
}
93559355
}
93569356
} else {
@@ -9385,12 +9385,12 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
93859385
"Got a message for a channel from the wrong node! No such channel for the passed counterparty_node_id {}",
93869386
counterparty_node_id
93879387
), msg.channel_id)),
9388-
hash_map::Entry::Occupied(mut chan) => {
9389-
if let Some(chan) = chan.get_mut().as_funded_mut() {
9388+
hash_map::Entry::Occupied(mut chan_entry) => {
9389+
if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
93909390
match chan.splice_ack(msg) {
93919391
Ok(_) => {}
93929392
Err(err) => {
9393-
return Err(MsgHandleErrInternal::from_chan_no_close(err, msg.channel_id));
9393+
try_channel_entry!(self, peer_state, Err(err), chan_entry)
93949394
}
93959395
}
93969396
} else {

0 commit comments

Comments
 (0)