Skip to content

Commit

Permalink
Create chain directory (#1872)
Browse files Browse the repository at this point in the history
Otherwise the creation of the jdbc url check file for postgres fails.
  • Loading branch information
pm47 authored Jul 15, 2021
1 parent 95fffe3 commit 547d7e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class Setup(val datadir: File,
val Seeds(nodeSeed, channelSeed) = seeds_opt.getOrElse(NodeParams.getSeeds(datadir))
val chain = config.getString("chain")
val chaindir = new File(datadir, chain)
chaindir.mkdirs()
val nodeKeyManager = new LocalNodeKeyManager(nodeSeed, NodeParams.hashFromChain(chain))
val channelKeyManager = new LocalChannelKeyManager(channelSeed, NodeParams.hashFromChain(chain))
val instanceId = UUID.randomUUID()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ object TestDatabases {
hikariConfig.setDataSource(datasource)
val lock: PgLock.LeaseLock = PgLock.LeaseLock(UUID.randomUUID(), 10 minutes, 8 minute, LockFailureHandler.logAndThrow)

val jdbcUrlFile: File = new File(sys.props("tmp.dir"), s"jdbcUrlFile_${UUID.randomUUID()}.tmp")
val jdbcUrlFile: File = new File(TestUtils.BUILD_DIRECTORY, s"jdbcUrlFile_${UUID.randomUUID()}.tmp")
jdbcUrlFile.deleteOnExit()

implicit val system: ActorSystem = ActorSystem()
Expand Down

0 comments on commit 547d7e7

Please sign in to comment.