Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bitcoin-s.datadir configuration key to be used instead of passing in a file #2114

Closed
Christewart opened this issue Oct 3, 2020 · 0 comments · Fixed by #2170
Closed

Comments

@Christewart
Copy link
Contributor

This is how AppConfigFactory is defined currently.

This is weird, because we allow users (specifically when using bitcoin-s as a library!) to specify a configuration in their application.conf for bitcoin-s.datadir. You can see this on the website here: https://bitcoin-s.org/docs/next/config/configuration#example-configuration-file

If you look closely at AppConfigFactory, we have no option for constructing an AppConfig solely from the contents of the configuration file.

Right now I have to do something like this to construct a DLCOracleAppConfig() for instance

  val datadir: Path =
    Files.createTempDirectory(s"hello-world-${scala.util.Random.nextInt(100)}")
  val appConfig = DLCOracleAppConfig.fromDatadir(datadir)
  val dbConfig = appConfig.slickDbConfig

We need to create something like

AppConfig.fromConfig()

@Christewart Christewart added this to the v0.5.0 milestone Oct 3, 2020
@Christewart Christewart added this to TODO in v0.5.0 via automation Oct 3, 2020
@benthecarman benthecarman moved this from TODO to In Progress in v0.5.0 Oct 12, 2020
@benthecarman benthecarman moved this from In Progress to Done in v0.5.0 Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v0.5.0
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant