mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-01-18 21:34:39 +01:00
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:
parent
3ae3090d50
commit
2f512364eb
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user