Add Ropsten to DNS Discovery (#1629)

DNS Discovery had options for mainnet, rinkeby, and goerli, but Ropsten
was left out.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
pull/1675/head
Danno Ferrin 4 years ago committed by GitHub
parent 9c22fbc61c
commit 4b692ff102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java
  2. 2
      ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java

@ -25,6 +25,7 @@ import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.MO
import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.RINKEBY_BOOTSTRAP_NODES; import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.RINKEBY_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.RINKEBY_DISCOVERY_URL; import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.RINKEBY_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.ROPSTEN_BOOTSTRAP_NODES; import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.ROPSTEN_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.ROPSTEN_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.YOLO_V2_BOOTSTRAP_NODES; import static org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration.YOLO_V2_BOOTSTRAP_NODES;
import org.hyperledger.besu.ethereum.p2p.peers.EnodeURL; import org.hyperledger.besu.ethereum.p2p.peers.EnodeURL;
@ -131,7 +132,10 @@ public class EthNetworkConfig {
switch (networkName) { switch (networkName) {
case ROPSTEN: case ROPSTEN:
return new EthNetworkConfig( return new EthNetworkConfig(
jsonConfig(ROPSTEN_GENESIS), ROPSTEN_NETWORK_ID, ROPSTEN_BOOTSTRAP_NODES, null); jsonConfig(ROPSTEN_GENESIS),
ROPSTEN_NETWORK_ID,
ROPSTEN_BOOTSTRAP_NODES,
ROPSTEN_DISCOVERY_URL);
case RINKEBY: case RINKEBY:
return new EthNetworkConfig( return new EthNetworkConfig(
jsonConfig(RINKEBY_GENESIS), jsonConfig(RINKEBY_GENESIS),

@ -33,6 +33,8 @@ public class DiscoveryConfiguration {
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"; "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net";
public static final String RINKEBY_DISCOVERY_URL = public static final String RINKEBY_DISCOVERY_URL =
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"; "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net";
public static final String ROPSTEN_DISCOVERY_URL =
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net";
public static final List<EnodeURL> MAINNET_BOOTSTRAP_NODES = public static final List<EnodeURL> MAINNET_BOOTSTRAP_NODES =
Collections.unmodifiableList( Collections.unmodifiableList(

Loading…
Cancel
Save