From 4b692ff102a1362183912d8600b0c8e59d021877 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Fri, 4 Dec 2020 07:08:00 -0700 Subject: [PATCH] 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 --- .../org/hyperledger/besu/cli/config/EthNetworkConfig.java | 6 +++++- .../besu/ethereum/p2p/config/DiscoveryConfiguration.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java b/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java index 656f0ba66a..d59db1ff23 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.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_DISCOVERY_URL; 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 org.hyperledger.besu.ethereum.p2p.peers.EnodeURL; @@ -131,7 +132,10 @@ public class EthNetworkConfig { switch (networkName) { case ROPSTEN: 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: return new EthNetworkConfig( jsonConfig(RINKEBY_GENESIS), diff --git a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java index a67ad04d9f..39fc116c70 100644 --- a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java +++ b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java @@ -33,6 +33,8 @@ public class DiscoveryConfiguration { "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"; public static final String RINKEBY_DISCOVERY_URL = "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"; + public static final String ROPSTEN_DISCOVERY_URL = + "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"; public static final List MAINNET_BOOTSTRAP_NODES = Collections.unmodifiableList(