@Test public void shouldReturnEnrFromDiscoveryService() { when(discoveryService.getEnr()).thenReturn(Optional.of("enr:-")); assertThat(discoveryNetwork.getEnr()).contains("enr:-"); }
@Override public Optional<String> getEnr() { return discoveryService.getEnr(); }
DiscoveryNetwork extends DelegatingP2PNetwork<P> { @Override public Optional<String> getEnr() { return discoveryService.getEnr(); } }
DiscoveryNetwork extends DelegatingP2PNetwork<P> { @Override public Optional<String> getEnr() { return discoveryService.getEnr(); } DiscoveryNetwork(
      final P2PNetwork<P> p2pNetwork,
      final DiscoveryService discoveryService,
      final ConnectionManager connectionManager); }
DiscoveryNetwork extends DelegatingP2PNetwork<P> { @Override public Optional<String> getEnr() { return discoveryService.getEnr(); } DiscoveryNetwork(
      final P2PNetwork<P> p2pNetwork,
      final DiscoveryService discoveryService,
      final ConnectionManager connectionManager); void initialize(); static DiscoveryNetwork<P> create(
      final MetricsSystem metricsSystem,
      final AsyncRunner asyncRunner,
      final KeyValueStore<String, Bytes> kvStore,
      final P2PNetwork<P> p2pNetwork,
      final PeerSelectionStrategy peerSelectionStrategy,
      final NetworkConfig p2pConfig); @Override SafeFuture<?> start(); @Override SafeFuture<?> stop(); void addStaticPeer(final String peerAddress); @Override Optional<String> getEnr(); @Override Optional<String> getDiscoveryAddress(); void setLongTermAttestationSubnetSubscriptions(Iterable<Integer> subnetIds); void setPreGenesisForkInfo(); void setForkInfo(final ForkInfo currentForkInfo, final Optional<Fork> nextForkInfo); @Override long subscribeConnect(final PeerConnectedSubscriber<P> subscriber); @Override void unsubscribeConnect(final long subscriptionId); @Override Optional<P> getPeer(final NodeId id); @Override Stream<P> streamPeers(); }
DiscoveryNetwork extends DelegatingP2PNetwork<P> { @Override public Optional<String> getEnr() { return discoveryService.getEnr(); } DiscoveryNetwork(
      final P2PNetwork<P> p2pNetwork,
      final DiscoveryService discoveryService,
      final ConnectionManager connectionManager); void initialize(); static DiscoveryNetwork<P> create(
      final MetricsSystem metricsSystem,
      final AsyncRunner asyncRunner,
      final KeyValueStore<String, Bytes> kvStore,
      final P2PNetwork<P> p2pNetwork,
      final PeerSelectionStrategy peerSelectionStrategy,
      final NetworkConfig p2pConfig); @Override SafeFuture<?> start(); @Override SafeFuture<?> stop(); void addStaticPeer(final String peerAddress); @Override Optional<String> getEnr(); @Override Optional<String> getDiscoveryAddress(); void setLongTermAttestationSubnetSubscriptions(Iterable<Integer> subnetIds); void setPreGenesisForkInfo(); void setForkInfo(final ForkInfo currentForkInfo, final Optional<Fork> nextForkInfo); @Override long subscribeConnect(final PeerConnectedSubscriber<P> subscriber); @Override void unsubscribeConnect(final long subscriptionId); @Override Optional<P> getPeer(final NodeId id); @Override Stream<P> streamPeers(); static final String ATTESTATION_SUBNET_ENR_FIELD; static final String ETH2_ENR_FIELD; }