@Test public void testUnexpectedElementInNodeConfigThrowsException() { String nodeWithUnexpectedElement = "peer = {" + "active = [{\n" + " port = 30303\n" + " nodeName = Test\n" + " unexpectedElement = 12345\n" + "}]}"; Config invalidConfig = ConfigFactory.parseString(nodeWithUnexpectedElement); SystemProperties props = new SystemProperties(); try { props.overrideParams(invalidConfig); } catch (RuntimeException ignore) { } }
public void overrideParams(Config overrideOptions) { config = overrideOptions.withFallback(config); validateConfig(); }
SystemProperties { public void overrideParams(Config overrideOptions) { config = overrideOptions.withFallback(config); validateConfig(); } }
SystemProperties { public void overrideParams(Config overrideOptions) { config = overrideOptions.withFallback(config); validateConfig(); } SystemProperties();  SystemProperties(File configFile);  SystemProperties(String configResource);  SystemProperties(Config apiConfig);  SystemProperties(Config apiConfig, ClassLoader classLoader); }
SystemProperties { public void overrideParams(Config overrideOptions) { config = overrideOptions.withFallback(config); validateConfig(); } SystemProperties();  SystemProperties(File configFile);  SystemProperties(String configResource);  SystemProperties(Config apiConfig);  SystemProperties(Config apiConfig, ClassLoader classLoader); static SystemProperties getDefault(); static void resetToDefault(); static void setUseOnlySpringConfig(boolean useOnlySpringConfig); static List<InputStream> loadResources(
            final String name, final ClassLoader classLoader); Config getConfig(); void overrideParams(Config overrideOptions); void overrideParams(String ... keyValuePairs); void overrideParams(Map<String, ?> cliOptions); T getProperty(String propName, T defaultValue); BlockchainNetConfig getBlockchainConfig(); void setBlockchainConfig(BlockchainNetConfig config); @ValidateMe boolean peerDiscovery(); void setDiscoveryEnabled(Boolean discoveryEnabled); @ValidateMe boolean peerDiscoveryPersist(); @ValidateMe int peerDiscoveryWorkers(); @ValidateMe int peerDiscoveryTouchPeriod(); @ValidateMe int peerDiscoveryTouchMaxNodes(); @ValidateMe int peerConnectionTimeout(); @ValidateMe int defaultP2PVersion(); @ValidateMe int rlpxMaxFrameSize(); @ValidateMe int transactionApproveTimeout(); @ValidateMe List<String> peerDiscoveryIPList(); @ValidateMe boolean databaseReset(); void setDatabaseReset(Boolean reset); @ValidateMe long databaseResetBlock(); @ValidateMe boolean databaseFromBackup(); @ValidateMe int databasePruneDepth(); @ValidateMe List<Node> peerActive(); @ValidateMe NodeFilter peerTrusted(); @ValidateMe Integer blockQueueSize(); @ValidateMe Integer headerQueueSize(); @ValidateMe Integer peerChannelReadTimeout(); @ValidateMe Integer traceStartBlock(); @ValidateMe boolean recordBlocks(); @ValidateMe boolean dumpFull(); @ValidateMe String dumpDir(); @ValidateMe String dumpStyle(); @ValidateMe int dumpBlock(); @ValidateMe String databaseDir(); String ethashDir(); void setDataBaseDir(String dataBaseDir); @ValidateMe boolean dumpCleanOnRestart(); @ValidateMe boolean playVM(); @ValidateMe boolean blockChainOnly(); @ValidateMe int syncPeerCount(); Integer syncVersion(); @ValidateMe boolean exitOnBlockConflict(); @ValidateMe String projectVersion(); @ValidateMe Integer databaseVersion(); @ValidateMe String projectVersionModifier(); @ValidateMe String helloPhrase(); @ValidateMe String rootHashStart(); @ValidateMe List<String> peerCapabilities(); @ValidateMe boolean vmTrace(); @ValidateMe boolean vmTraceCompressed(); @ValidateMe int vmTraceInitStorageLimit(); @ValidateMe int cacheFlushBlocks(); @ValidateMe String vmTraceDir(); String customSolcPath(); String privateKey(); ECKey getMyKey(); byte[] nodeId(); @ValidateMe int networkId(); @ValidateMe int maxActivePeers(); @ValidateMe boolean eip8(); @ValidateMe int listenPort(); String bindIp(); String externalIp(); @ValidateMe String getKeyValueDataSource(); @ValidateMe boolean isSyncEnabled(); void setSyncEnabled(Boolean syncEnabled); @ValidateMe boolean isFastSyncEnabled(); @ValidateMe byte[] getFastSyncPivotBlockHash(); @ValidateMe boolean fastSyncBackupState(); @ValidateMe boolean fastSyncSkipHistory(); @ValidateMe int makeDoneByTimeout(); @ValidateMe boolean isPublicHomeNode(); @ValidateMe String genesisInfo(); @ValidateMe int txOutdatedThreshold(); void setGenesisInfo(String genesisInfo); @ValidateMe boolean minerStart(); @ValidateMe byte[] getMinerCoinbase(); @ValidateMe byte[] getMineExtraData(); @ValidateMe BigInteger getMineMinGasPrice(); @ValidateMe long getMineMinBlockTimeoutMsec(); @ValidateMe int getMineCpuThreads(); @ValidateMe boolean isMineFullDataset(); @ValidateMe String getCryptoProviderName(); @ValidateMe boolean recordInternalTransactionsData(); void setRecordInternalTransactionsData(Boolean recordInternalTransactionsData); @ValidateMe String getHash256AlgName(); @ValidateMe String getHash512AlgName(); @ValidateMe String getEthashMode(); Genesis getGenesis(); Genesis useGenesis(InputStream inputStream); String dump(); boolean vmTestLoadLocal(); String blocksLoader(); String githubTestsPath(); boolean githubTestsLoadLocal(); }
SystemProperties { public void overrideParams(Config overrideOptions) { config = overrideOptions.withFallback(config); validateConfig(); } SystemProperties();  SystemProperties(File configFile);  SystemProperties(String configResource);  SystemProperties(Config apiConfig);  SystemProperties(Config apiConfig, ClassLoader classLoader); static SystemProperties getDefault(); static void resetToDefault(); static void setUseOnlySpringConfig(boolean useOnlySpringConfig); static List<InputStream> loadResources(
            final String name, final ClassLoader classLoader); Config getConfig(); void overrideParams(Config overrideOptions); void overrideParams(String ... keyValuePairs); void overrideParams(Map<String, ?> cliOptions); T getProperty(String propName, T defaultValue); BlockchainNetConfig getBlockchainConfig(); void setBlockchainConfig(BlockchainNetConfig config); @ValidateMe boolean peerDiscovery(); void setDiscoveryEnabled(Boolean discoveryEnabled); @ValidateMe boolean peerDiscoveryPersist(); @ValidateMe int peerDiscoveryWorkers(); @ValidateMe int peerDiscoveryTouchPeriod(); @ValidateMe int peerDiscoveryTouchMaxNodes(); @ValidateMe int peerConnectionTimeout(); @ValidateMe int defaultP2PVersion(); @ValidateMe int rlpxMaxFrameSize(); @ValidateMe int transactionApproveTimeout(); @ValidateMe List<String> peerDiscoveryIPList(); @ValidateMe boolean databaseReset(); void setDatabaseReset(Boolean reset); @ValidateMe long databaseResetBlock(); @ValidateMe boolean databaseFromBackup(); @ValidateMe int databasePruneDepth(); @ValidateMe List<Node> peerActive(); @ValidateMe NodeFilter peerTrusted(); @ValidateMe Integer blockQueueSize(); @ValidateMe Integer headerQueueSize(); @ValidateMe Integer peerChannelReadTimeout(); @ValidateMe Integer traceStartBlock(); @ValidateMe boolean recordBlocks(); @ValidateMe boolean dumpFull(); @ValidateMe String dumpDir(); @ValidateMe String dumpStyle(); @ValidateMe int dumpBlock(); @ValidateMe String databaseDir(); String ethashDir(); void setDataBaseDir(String dataBaseDir); @ValidateMe boolean dumpCleanOnRestart(); @ValidateMe boolean playVM(); @ValidateMe boolean blockChainOnly(); @ValidateMe int syncPeerCount(); Integer syncVersion(); @ValidateMe boolean exitOnBlockConflict(); @ValidateMe String projectVersion(); @ValidateMe Integer databaseVersion(); @ValidateMe String projectVersionModifier(); @ValidateMe String helloPhrase(); @ValidateMe String rootHashStart(); @ValidateMe List<String> peerCapabilities(); @ValidateMe boolean vmTrace(); @ValidateMe boolean vmTraceCompressed(); @ValidateMe int vmTraceInitStorageLimit(); @ValidateMe int cacheFlushBlocks(); @ValidateMe String vmTraceDir(); String customSolcPath(); String privateKey(); ECKey getMyKey(); byte[] nodeId(); @ValidateMe int networkId(); @ValidateMe int maxActivePeers(); @ValidateMe boolean eip8(); @ValidateMe int listenPort(); String bindIp(); String externalIp(); @ValidateMe String getKeyValueDataSource(); @ValidateMe boolean isSyncEnabled(); void setSyncEnabled(Boolean syncEnabled); @ValidateMe boolean isFastSyncEnabled(); @ValidateMe byte[] getFastSyncPivotBlockHash(); @ValidateMe boolean fastSyncBackupState(); @ValidateMe boolean fastSyncSkipHistory(); @ValidateMe int makeDoneByTimeout(); @ValidateMe boolean isPublicHomeNode(); @ValidateMe String genesisInfo(); @ValidateMe int txOutdatedThreshold(); void setGenesisInfo(String genesisInfo); @ValidateMe boolean minerStart(); @ValidateMe byte[] getMinerCoinbase(); @ValidateMe byte[] getMineExtraData(); @ValidateMe BigInteger getMineMinGasPrice(); @ValidateMe long getMineMinBlockTimeoutMsec(); @ValidateMe int getMineCpuThreads(); @ValidateMe boolean isMineFullDataset(); @ValidateMe String getCryptoProviderName(); @ValidateMe boolean recordInternalTransactionsData(); void setRecordInternalTransactionsData(Boolean recordInternalTransactionsData); @ValidateMe String getHash256AlgName(); @ValidateMe String getHash512AlgName(); @ValidateMe String getEthashMode(); Genesis getGenesis(); Genesis useGenesis(InputStream inputStream); String dump(); boolean vmTestLoadLocal(); String blocksLoader(); String githubTestsPath(); boolean githubTestsLoadLocal(); final static String PROPERTY_DB_DIR; final static String PROPERTY_LISTEN_PORT; final static String PROPERTY_PEER_ACTIVE; final static String PROPERTY_DB_RESET; final static String PROPERTY_PEER_DISCOVERY_ENABLED; }