-
Notifications
You must be signed in to change notification settings - Fork 130
Add --ropsten command line argument #197
Add --ropsten command line argument #197
Conversation
"enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303", | ||
"enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303") | ||
.map(DefaultPeer::fromURI) | ||
.collect(toList())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are based on the Starting Pantheon page in the Wiki.
@@ -59,6 +59,7 @@ | |||
|
|||
private static final Logger LOG = LogManager.getLogger(); | |||
public static final int MAINNET_NETWORK_ID = 1; | |||
public static final int ROPSTEN_NETWORK_ID = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is MainnetPantheonController
a reasonable place to define this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't really fit all that well. I suspect it would be better if all three of MainNet, Rinkeby and Ropsten network IDs were moved to the EthNetworkConfig class. It already has the statics for genesis configs and is the only place those constants are used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really helpful, thanks for submitting. Functionally all looks good, just the couple of minor tweaks and it should be good to go.
rinkeby ? EthNetworkConfig.rinkeby() : EthNetworkConfig.mainnet(); | ||
rinkeby | ||
? EthNetworkConfig.rinkeby() | ||
: ropsten ? EthNetworkConfig.ropsten() : EthNetworkConfig.mainnet(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make this a full if/else instead of the nested ternary if please?
4423ba3
to
8e9089c
Compare
@ajsutton Thank you for the review! All comments should be addressed now. |
Awesome, thanks. I've also added a error message if both |
PR description
Add a command line argument to connect to Ropsten.
Fixed Issue(s)
Closes #186.