File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
lightning/src/blinded_path Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ use crate::offers::invoice::BlindedPayInfo;
21
21
use crate :: routing:: gossip:: { NodeId , ReadOnlyNetworkGraph } ;
22
22
use crate :: sign:: EntropySource ;
23
23
use crate :: util:: ser:: { Readable , Writeable , Writer } ;
24
+ use crate :: util:: scid_utils;
24
25
25
26
use crate :: io;
26
27
use crate :: prelude:: * ;
@@ -231,7 +232,8 @@ impl BlindedPath {
231
232
if let Some ( ( scid, channel_info) ) = node_info
232
233
. channels
233
234
. iter ( )
234
- . find_map ( |scid| network_graph. channel ( * scid) . map ( |info| ( * scid, info) ) )
235
+ . filter_map ( |scid| network_graph. channel ( * scid) . map ( |info| ( * scid, info) ) )
236
+ . min_by_key ( |( scid, _) | scid_utils:: block_from_scid ( * scid) )
235
237
{
236
238
let direction = if node_id == channel_info. node_one {
237
239
Direction :: NodeOne
You can’t perform that action at this time.
0 commit comments