File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -457,10 +457,10 @@ impl Node {
457
457
continue ;
458
458
}
459
459
460
- let addresses = if let Some ( addresses ) = bcast_config. announcement_addresses. clone( ) {
461
- addresses
462
- } else if let Some ( addresses ) = bcast_config. listening_addresses. clone( ) {
463
- addresses
460
+ let addresses = if let Some ( announcement_addresses ) = bcast_config. announcement_addresses. clone( ) {
461
+ announcement_addresses
462
+ } else if let Some ( listening_addresses ) = bcast_config. listening_addresses. clone( ) {
463
+ listening_addresses
464
464
} else {
465
465
debug_assert!( false , "We checked whether the node may announce, so listening addresses should always be set" ) ;
466
466
continue ;
@@ -804,9 +804,12 @@ impl Node {
804
804
self . config . listening_addresses . clone ( )
805
805
}
806
806
807
- /// Returns our own announcement addresses .
807
+ /// Returns the addresses that the node will announce to the network .
808
808
pub fn announcement_addresses ( & self ) -> Option < Vec < SocketAddress > > {
809
- self . config . announcement_addresses . clone ( )
809
+ self . config
810
+ . announcement_addresses
811
+ . clone ( )
812
+ . or_else ( || self . config . listening_addresses . clone ( ) )
810
813
}
811
814
812
815
/// Returns our node alias.
You can’t perform that action at this time.
0 commit comments