File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -989,16 +989,14 @@ impl Router {
989
989
loop {
990
990
if let Some ( & ( _, ref features) ) = first_hop_targets. get ( & res. last ( ) . unwrap ( ) . pubkey ) {
991
991
res. last_mut ( ) . unwrap ( ) . node_features = NodeFeatures :: with_known_relevant_init_flags ( & features) ;
992
+ } else if let Some ( node) = network. nodes . get ( & res. last ( ) . unwrap ( ) . pubkey ) {
993
+ res. last_mut ( ) . unwrap ( ) . node_features = node. features . clone ( ) ;
992
994
} else {
993
- if let Some ( node) = network. nodes . get ( & res. last ( ) . unwrap ( ) . pubkey ) {
994
- res. last_mut ( ) . unwrap ( ) . node_features = node. features . clone ( ) ;
995
- } else {
996
- // We should be able to fill in features for everything except the last
997
- // hop, if the last hop was provided via a BOLT 11 invoice (though we
998
- // should be able to extend it further as BOLT 11 does have feature
999
- // flags for the last hop node itself).
1000
- assert ! ( res. last( ) . unwrap( ) . pubkey == * target) ;
1001
- }
995
+ // We should be able to fill in features for everything except the last
996
+ // hop, if the last hop was provided via a BOLT 11 invoice (though we
997
+ // should be able to extend it further as BOLT 11 does have feature
998
+ // flags for the last hop node itself).
999
+ assert ! ( res. last( ) . unwrap( ) . pubkey == * target) ;
1002
1000
}
1003
1001
if res. last ( ) . unwrap ( ) . pubkey == * target {
1004
1002
break ;
You can’t perform that action at this time.
0 commit comments