File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -794,18 +794,24 @@ impl Node {
794794 return ;
795795 }
796796
797- if bcast_cm. list_channels ( ) . iter ( ) . any ( |chan| chan. is_public ) {
798- interval. tick ( ) . await ;
797+ if !bcast_cm. list_channels ( ) . iter ( ) . any ( |chan| chan. is_public ) {
798+ continue ;
799+ }
799800
800- while bcast_pm. get_peer_node_ids ( ) . is_empty ( ) {
801- // Sleep a bit and retry if we don't have any peers yet.
802- tokio:: time:: sleep ( Duration :: from_secs ( 5 ) ) . await ;
803- }
801+ interval. tick ( ) . await ;
804802
805- let addresses =
806- bcast_config. listening_address . iter ( ) . cloned ( ) . map ( |a| a. 0 ) . collect ( ) ;
807- bcast_pm. broadcast_node_announcement ( [ 0 ; 3 ] , [ 0 ; 32 ] , addresses) ;
803+ if !bcast_cm. list_channels ( ) . iter ( ) . any ( |chan| chan. is_public ) {
804+ continue ;
808805 }
806+
807+ while bcast_pm. get_peer_node_ids ( ) . is_empty ( ) {
808+ // Sleep a bit and retry if we don't have any peers yet.
809+ tokio:: time:: sleep ( Duration :: from_secs ( 5 ) ) . await ;
810+ }
811+
812+ let addresses =
813+ bcast_config. listening_address . iter ( ) . cloned ( ) . map ( |a| a. 0 ) . collect ( ) ;
814+ bcast_pm. broadcast_node_announcement ( [ 0 ; 3 ] , [ 0 ; 32 ] , addresses) ;
809815 }
810816 } ) ;
811817
You can’t perform that action at this time.
0 commit comments