Correcly use reference.conf file (#1869)

* Correcly use reference.conf file

* Fix for network specific filter header batch size config option

* Add to other conf files
This commit is contained in:
Ben Carman 2020-08-24 06:30:16 -05:00 committed by GitHub
parent 3ae3090d50
commit 2f512364eb
5 changed files with 7 additions and 7 deletions

View File

@ -90,7 +90,7 @@ case class ChainAppConfig(
s"$moduleName.neutrino.filter-header-batch-size.${chain.network.chainParams.networkId}")
} catch {
case _: ConfigException.Missing | _: ConfigException.WrongType =>
config.getInt(s"$moduleName.neutrino.filter-header-batch-size")
config.getInt(s"$moduleName.neutrino.filter-header-batch-size.default")
}
}

View File

@ -50,7 +50,7 @@ bitcoin-s {
chain {
neutrino {
filter-header-batch-size = 2000
filter-header-batch-size.default = 2000
filter-header-batch-size.regtest = 10
# You can set a network specific filter-header-batch-size
# by adding a trailing `.networkId` (main, test, regtest)

View File

@ -263,12 +263,12 @@ object AppConfig extends BitcoinSLogger {
withDatadir.withFallback(config)
}
// `load` tries to resolve substitions,
// `load` tries to resolve substitutions,
// `parseResources` does not
val dbConfig = ConfigFactory
.parseResources("db.conf")
// we want to NOT resolve substitutions in the configuraton until the user
// we want to NOT resolve substitutions in the configuration until the user
// provided configs also has been loaded. .parseResources() does not do that
// whereas .load() does
val classPathConfig = {
@ -294,7 +294,7 @@ object AppConfig extends BitcoinSLogger {
.reduce(_.withFallback(_))
// to make the overrides actually override
// the default setings we have to do it
// the default settings we have to do it
// in this order
overrides.withFallback(unresolvedConfig)
} else {

View File

@ -141,7 +141,7 @@ bitcoin-s {
chain {
force-recalc-chainwork = false
neutrino {
filter-header-batch-size = 2000
filter-header-batch-size.default = 2000
filter-header-batch-size.regtest = 10
# You can set a network specific filter-header-batch-size
# by adding a trailing `.networkId` (main, test, regtest)

View File

@ -51,7 +51,7 @@ bitcoin-s {
chain {
neutrino {
filter-header-batch-size = 2000
filter-header-batch-size.default = 2000
filter-header-batch-size.regtest = 10
# You can set a network specific filter-header-batch-size
# by adding a trailing `.networkId` (main, test, regtest)