@Test void getAdvertisedIp_shouldUseAdvertisedAddressWhenSet() { final String expected = "1.2.3.4"; advertisedIp = Optional.of(expected); assertThat(createConfig().getAdvertisedIp()).isEqualTo(expected); }
public String getAdvertisedIp() { return resolveAnyLocalAddress(advertisedIp.orElse(networkInterface)); }
NetworkConfig { public String getAdvertisedIp() { return resolveAnyLocalAddress(advertisedIp.orElse(networkInterface)); } }
NetworkConfig { public String getAdvertisedIp() { return resolveAnyLocalAddress(advertisedIp.orElse(networkInterface)); } NetworkConfig(
      final PrivKey privateKey,
      final String networkInterface,
      final Optional<String> advertisedIp,
      final int listenPort,
      final OptionalInt advertisedPort,
      final List<String> staticPeers,
      final boolean isDiscoveryEnabled,
      final List<String> bootnodes,
      final TargetPeerRange targetPeerRange,
      final int targetSubnetSubscriberCount);  NetworkConfig(
      final PrivKey privateKey,
      final String networkInterface,
      final Optional<String> advertisedIp,
      final int listenPort,
      final OptionalInt advertisedPort,
      final List<String> staticPeers,
      final boolean isDiscoveryEnabled,
      final List<String> bootnodes,
      final TargetPeerRange targetPeerRange,
      final int targetSubnetSubscriberCount,
      final GossipConfig gossipConfig,
      final WireLogsConfig wireLogsConfig); }
NetworkConfig { public String getAdvertisedIp() { return resolveAnyLocalAddress(advertisedIp.orElse(networkInterface)); } NetworkConfig(
      final PrivKey privateKey,
      final String networkInterface,
      final Optional<String> advertisedIp,
      final int listenPort,
      final OptionalInt advertisedPort,
      final List<String> staticPeers,
      final boolean isDiscoveryEnabled,
      final List<String> bootnodes,
      final TargetPeerRange targetPeerRange,
      final int targetSubnetSubscriberCount);  NetworkConfig(
      final PrivKey privateKey,
      final String networkInterface,
      final Optional<String> advertisedIp,
      final int listenPort,
      final OptionalInt advertisedPort,
      final List<String> staticPeers,
      final boolean isDiscoveryEnabled,
      final List<String> bootnodes,
      final TargetPeerRange targetPeerRange,
      final int targetSubnetSubscriberCount,
      final GossipConfig gossipConfig,
      final WireLogsConfig wireLogsConfig); void validateListenPortAvailable(); PrivKey getPrivateKey(); String getNetworkInterface(); String getAdvertisedIp(); int getListenPort(); int getAdvertisedPort(); List<String> getStaticPeers(); boolean isDiscoveryEnabled(); List<String> getBootnodes(); TargetPeerRange getTargetPeerRange(); int getTargetSubnetSubscriberCount(); GossipConfig getGossipConfig(); WireLogsConfig getWireLogsConfig(); }
NetworkConfig { public String getAdvertisedIp() { return resolveAnyLocalAddress(advertisedIp.orElse(networkInterface)); } NetworkConfig(
      final PrivKey privateKey,
      final String networkInterface,
      final Optional<String> advertisedIp,
      final int listenPort,
      final OptionalInt advertisedPort,
      final List<String> staticPeers,
      final boolean isDiscoveryEnabled,
      final List<String> bootnodes,
      final TargetPeerRange targetPeerRange,
      final int targetSubnetSubscriberCount);  NetworkConfig(
      final PrivKey privateKey,
      final String networkInterface,
      final Optional<String> advertisedIp,
      final int listenPort,
      final OptionalInt advertisedPort,
      final List<String> staticPeers,
      final boolean isDiscoveryEnabled,
      final List<String> bootnodes,
      final TargetPeerRange targetPeerRange,
      final int targetSubnetSubscriberCount,
      final GossipConfig gossipConfig,
      final WireLogsConfig wireLogsConfig); void validateListenPortAvailable(); PrivKey getPrivateKey(); String getNetworkInterface(); String getAdvertisedIp(); int getListenPort(); int getAdvertisedPort(); List<String> getStaticPeers(); boolean isDiscoveryEnabled(); List<String> getBootnodes(); TargetPeerRange getTargetPeerRange(); int getTargetSubnetSubscriberCount(); GossipConfig getGossipConfig(); WireLogsConfig getWireLogsConfig();  }