File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -1624,20 +1624,14 @@ impl ChannelMessageHandler for ChannelManager {
1624
1624
// destination. That's OK since those nodes are probably busted or trying to do network
1625
1625
// mapping through repeated loops. In either case, we want them to stop talking to us, so
1626
1626
// we send permanent_node_failure.
1627
- match & claimable_htlcs_entry {
1628
- & hash_map:: Entry :: Occupied ( ref e) => {
1629
- let mut acceptable_cycle = false ;
1630
- match e. get ( ) {
1631
- & PendingOutboundHTLC :: OutboundRoute { .. } => {
1632
- acceptable_cycle = pending_forward_info. short_channel_id == 0 ;
1633
- } ,
1634
- _ => { } ,
1635
- }
1636
- if !acceptable_cycle {
1637
- return_err ! ( "Payment looped through us twice" , 0x4000 | 0x2000 | 2 , & [ 0 ; 0 ] ) ;
1638
- }
1639
- } ,
1640
- _ => { } ,
1627
+ if let & hash_map:: Entry :: Occupied ( ref e) = & claimable_htlcs_entry {
1628
+ let mut acceptable_cycle = false ;
1629
+ if let & PendingOutboundHTLC :: OutboundRoute { .. } = e. get ( ) {
1630
+ acceptable_cycle = pending_forward_info. short_channel_id == 0 ;
1631
+ }
1632
+ if !acceptable_cycle {
1633
+ return_err ! ( "Payment looped through us twice" , 0x4000 | 0x2000 | 2 , & [ 0 ; 0 ] ) ;
1634
+ }
1641
1635
}
1642
1636
1643
1637
let ( source_short_channel_id, res) = match channel_state. by_id . get_mut ( & msg. channel_id ) {
You can’t perform that action at this time.
0 commit comments