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 @@ -534,9 +534,17 @@ trait GenesisDataLoaderBuilder {
534
534
lazy val genesisDataLoader = new GenesisDataLoader (blockchain, blockchainConfig)
535
535
}
536
536
537
- trait SecureRandomBuilder {
537
+ trait SecureRandomBuilder extends Logger {
538
538
lazy val secureRandom : SecureRandom =
539
- Config .secureRandomAlgo.flatMap(name => Try (SecureRandom .getInstance(name)).toOption).getOrElse(new SecureRandom ())
539
+ Config .secureRandomAlgo
540
+ .flatMap(name => Try (SecureRandom .getInstance(name)) match {
541
+ case Failure (exception) =>
542
+ log.warn(s " Couldn't create SecureRandom instance using algorithm ${name}. Falling-back to default one " )
543
+ None
544
+ case Success (value) =>
545
+ Some (value)
546
+ })
547
+ .getOrElse(new SecureRandom ())
540
548
}
541
549
542
550
/** Provides the basic functionality of a Node, except the consensus algorithm.
You can’t perform that action at this time.
0 commit comments