Skip to content

Commit f7430cd

Browse files
committed
Add windows ini support, allow default use of SecureRandom(), fix stack size setting on Linux
1 parent 0167a0e commit f7430cd

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

src/main/resources/application.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ grothendieck {
1919

2020
# one of the algorithms defined here:
2121
# https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SecureRandom
22-
secure-random-algo = "NativePRNG"
22+
# Uncomment this to specify, otherwise use the default 'strong' implementation
23+
# secure-random-algo = "NativePRNG"
2324

2425
network {
2526
# Ethereum protocol version

src/main/scala/io/iohk/ethereum/nodebuilder/NodeBuilder.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ trait GenesisDataLoaderBuilder {
406406
}
407407

408408
trait SecureRandomBuilder {
409-
lazy val secureRandom: SecureRandom = SecureRandom.getInstance(Config.secureRandomAlgo)
409+
lazy val secureRandom: SecureRandom =
410+
Config.secureRandomAlgo.map(SecureRandom.getInstance(_)).getOrElse(new SecureRandom())
410411
}
411412

412413
trait Node extends NodeKeyBuilder

src/main/scala/io/iohk/ethereum/utils/Config.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ object Config {
3131

3232
val shutdownTimeout: Duration = config.getDuration("shutdown-timeout").toMillis.millis
3333

34-
val secureRandomAlgo: String = config.getString("secure-random-algo")
34+
val secureRandomAlgo: Option[String] =
35+
if(config.hasPath("secure-random-algo")) Some(config.getString("secure-random-algo"))
36+
else None
3537

3638
object Network {
3739
private val networkConfig = config.getConfig("network")

src/universal/conf/application.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Dconfig.file=./conf/grothendieck.conf -Dlogback.configurationFile=./conf/logback.xml -Xss10M
1+
-Dconfig.file=./conf/grothendieck.conf -Dlogback.configurationFile=./conf/logback.xml -J-Xss10M

src/universal/etc_client_config.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-Dconfig.file=.\conf\grothendieck.conf
2+
-Dlogback.configurationFile=.\conf\logback.xml
3+
-Xss10M

0 commit comments

Comments
 (0)