File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/main/scala/io/iohk/ethereum/nodebuilder Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -508,9 +508,17 @@ trait GenesisDataLoaderBuilder {
508
508
lazy val genesisDataLoader = new GenesisDataLoader (blockchain, blockchainConfig)
509
509
}
510
510
511
- trait SecureRandomBuilder {
511
+ trait SecureRandomBuilder extends Logger {
512
512
lazy val secureRandom : SecureRandom =
513
- Config .secureRandomAlgo.flatMap(name => Try (SecureRandom .getInstance(name)).toOption).getOrElse(new SecureRandom ())
513
+ Config .secureRandomAlgo
514
+ .flatMap(name => Try (SecureRandom .getInstance(name)) match {
515
+ case Failure (exception) =>
516
+ log.warn(s " Couldn't create SecureRandom instance using algorithm ${name}. Falling-back to default one " )
517
+ None
518
+ case Success (value) =>
519
+ Some (value)
520
+ })
521
+ .getOrElse(new SecureRandom ())
514
522
}
515
523
516
524
/** Provides the basic functionality of a Node, except the consensus algorithm.
You can’t perform that action at this time.
0 commit comments