@ -24,8 +24,6 @@ import static org.mockito.Mockito.verifyZeroInteractions;
import static tech.pegasys.pantheon.ethereum.p2p.config.DiscoveryConfiguration.MAINNET_BOOTSTRAP_NODES ;
import static tech.pegasys.pantheon.ethereum.p2p.config.DiscoveryConfiguration.MAINNET_BOOTSTRAP_NODES ;
import tech.pegasys.pantheon.PantheonInfo ;
import tech.pegasys.pantheon.PantheonInfo ;
import tech.pegasys.pantheon.consensus.clique.jsonrpc.CliqueRpcApis ;
import tech.pegasys.pantheon.consensus.ibft.jsonrpc.IbftRpcApis ;
import tech.pegasys.pantheon.ethereum.core.Address ;
import tech.pegasys.pantheon.ethereum.core.Address ;
import tech.pegasys.pantheon.ethereum.core.MiningParameters ;
import tech.pegasys.pantheon.ethereum.core.MiningParameters ;
import tech.pegasys.pantheon.ethereum.core.PrivacyParameters ;
import tech.pegasys.pantheon.ethereum.core.PrivacyParameters ;
@ -86,13 +84,9 @@ public class PantheonCommandTest extends CommandTestAbstract {
static {
static {
final JsonRpcConfiguration rpcConf = JsonRpcConfiguration . createDefault ( ) ;
final JsonRpcConfiguration rpcConf = JsonRpcConfiguration . createDefault ( ) ;
rpcConf . addRpcApi ( CliqueRpcApis . CLIQUE ) ;
rpcConf . addRpcApi ( IbftRpcApis . IBFT ) ;
defaultJsonRpcConfiguration = rpcConf ;
defaultJsonRpcConfiguration = rpcConf ;
final WebSocketConfiguration websocketConf = WebSocketConfiguration . createDefault ( ) ;
final WebSocketConfiguration websocketConf = WebSocketConfiguration . createDefault ( ) ;
websocketConf . addRpcApi ( CliqueRpcApis . CLIQUE ) ;
websocketConf . addRpcApi ( IbftRpcApis . IBFT ) ;
defaultWebSocketConfiguration = websocketConf ;
defaultWebSocketConfiguration = websocketConf ;
defaultMetricsConfiguration = MetricsConfiguration . createDefault ( ) ;
defaultMetricsConfiguration = MetricsConfiguration . createDefault ( ) ;
@ -109,7 +103,7 @@ public class PantheonCommandTest extends CommandTestAbstract {
@Test
@Test
public void callingHelpDisplaysDefaultRpcApisCorrectly ( ) {
public void callingHelpDisplaysDefaultRpcApisCorrectly ( ) {
parseCommand ( "--help" ) ;
parseCommand ( "--help" ) ;
assertThat ( commandOutput . toString ( ) ) . contains ( "default: ETH,NET,WEB3,CLIQUE,IBFT " ) ;
assertThat ( commandOutput . toString ( ) ) . contains ( "default: [ETH, NET, WEB3] " ) ;
assertThat ( commandErrorOutput . toString ( ) ) . isEmpty ( ) ;
assertThat ( commandErrorOutput . toString ( ) ) . isEmpty ( ) ;
}
}
@ -256,16 +250,12 @@ public class PantheonCommandTest extends CommandTestAbstract {
jsonRpcConfiguration . setPort ( 5678 ) ;
jsonRpcConfiguration . setPort ( 5678 ) ;
jsonRpcConfiguration . setCorsAllowedDomains ( Collections . emptyList ( ) ) ;
jsonRpcConfiguration . setCorsAllowedDomains ( Collections . emptyList ( ) ) ;
jsonRpcConfiguration . setRpcApis ( RpcApis . DEFAULT_JSON_RPC_APIS ) ;
jsonRpcConfiguration . setRpcApis ( RpcApis . DEFAULT_JSON_RPC_APIS ) ;
jsonRpcConfiguration . addRpcApi ( CliqueRpcApis . CLIQUE ) ;
jsonRpcConfiguration . addRpcApi ( IbftRpcApis . IBFT ) ;
final WebSocketConfiguration webSocketConfiguration = WebSocketConfiguration . createDefault ( ) ;
final WebSocketConfiguration webSocketConfiguration = WebSocketConfiguration . createDefault ( ) ;
webSocketConfiguration . setEnabled ( false ) ;
webSocketConfiguration . setEnabled ( false ) ;
webSocketConfiguration . setHost ( "9.10.11.12" ) ;
webSocketConfiguration . setHost ( "9.10.11.12" ) ;
webSocketConfiguration . setPort ( 9101 ) ;
webSocketConfiguration . setPort ( 9101 ) ;
webSocketConfiguration . setRpcApis ( WebSocketConfiguration . DEFAULT_WEBSOCKET_APIS ) ;
webSocketConfiguration . setRpcApis ( WebSocketConfiguration . DEFAULT_WEBSOCKET_APIS ) ;
webSocketConfiguration . addRpcApi ( CliqueRpcApis . CLIQUE ) ;
webSocketConfiguration . addRpcApi ( IbftRpcApis . IBFT ) ;
final MetricsConfiguration metricsConfiguration = MetricsConfiguration . createDefault ( ) ;
final MetricsConfiguration metricsConfiguration = MetricsConfiguration . createDefault ( ) ;
metricsConfiguration . setEnabled ( false ) ;
metricsConfiguration . setEnabled ( false ) ;
@ -358,12 +348,8 @@ public class PantheonCommandTest extends CommandTestAbstract {
parseCommand ( "--config-file" , configFile ) ;
parseCommand ( "--config-file" , configFile ) ;
final JsonRpcConfiguration jsonRpcConfiguration = JsonRpcConfiguration . createDefault ( ) ;
final JsonRpcConfiguration jsonRpcConfiguration = JsonRpcConfiguration . createDefault ( ) ;
jsonRpcConfiguration . addRpcApi ( CliqueRpcApis . CLIQUE ) ;
jsonRpcConfiguration . addRpcApi ( IbftRpcApis . IBFT ) ;
final WebSocketConfiguration webSocketConfiguration = WebSocketConfiguration . createDefault ( ) ;
final WebSocketConfiguration webSocketConfiguration = WebSocketConfiguration . createDefault ( ) ;
webSocketConfiguration . addRpcApi ( CliqueRpcApis . CLIQUE ) ;
webSocketConfiguration . addRpcApi ( IbftRpcApis . IBFT ) ;
final MetricsConfiguration metricsConfiguration = MetricsConfiguration . createDefault ( ) ;
final MetricsConfiguration metricsConfiguration = MetricsConfiguration . createDefault ( ) ;