lnd.xprv/lncfg
Yong 582b164c46
kvdb: add timeout options for bbolt (#4787)
* mod: bump btcwallet version to accept db timeout

* btcwallet: add DBTimeOut in config

* kvdb: add database timeout option for bbolt

This commit adds a DBTimeout option in bbolt config. The relevant
functions walletdb.Open/Create are updated to use this config. In
addition, the bolt compacter also applies the new timeout option.

* channeldb: add DBTimeout in db options

This commit adds the DBTimeout option for channeldb. A new unit
test file is created to test the default options. In addition,
the params used in kvdb.Create inside channeldb_test is updated
with a DefaultDBTimeout value.

* contractcourt+routing: use DBTimeout in kvdb

This commit touches multiple test files in contractcourt and routing.
The call of function kvdb.Create and kvdb.Open are now updated with
the new param DBTimeout, using the default value kvdb.DefaultDBTimeout.

* lncfg: add DBTimeout option in db config

The DBTimeout option is added to db config. A new unit test is
added to check the default DB config is created as expected.

* migration: add DBTimeout param in kvdb.Create/kvdb.Open

* keychain: update tests to use DBTimeout param

* htlcswitch+chainreg: add DBTimeout option

* macaroons: support DBTimeout config in creation

This commit adds the DBTimeout during the creation of macaroons.db.
The usage of kvdb.Create and kvdb.Open in its tests are updated with
a timeout value using kvdb.DefaultDBTimeout.

* walletunlocker: add dbTimeout option in UnlockerService

This commit adds a new param, dbTimeout, during the creation of
UnlockerService. This param is then passed to wallet.NewLoader
inside various service calls, specifying a timeout value to be
used when opening the bbolt. In addition, the macaroonService
is also called with this dbTimeout param.

* watchtower/wtdb: add dbTimeout param during creation

This commit adds the dbTimeout param for the creation of both
watchtower.db and wtclient.db.

* multi: add db timeout param for walletdb.Create

This commit adds the db timeout param for the function call
walletdb.Create. It touches only the test files found in chainntnfs,
lnwallet, and routing.

* lnd: pass DBTimeout config to relevant services

This commit enables lnd to pass the DBTimeout config to the following
services/config/functions,
  - chainControlConfig
  - walletunlocker
  - wallet.NewLoader
  - macaroons
  - watchtower
In addition, the usage of wallet.Create is updated too.

* sample-config: add dbtimeout option
2020-12-07 15:31:49 -08:00
..
address_test.go lncfg: allow no auth on private addresses 2020-07-22 22:50:25 +08:00
address.go config: enforce safe use of TLS 2020-11-11 09:37:53 +01:00
autopilot.go config+lncfg: move config structs to lncfg, drop suffix 2020-05-14 14:37:48 +02:00
bitcoind.go config+lncfg: move config structs to lncfg, drop suffix 2020-05-14 14:37:48 +02:00
btcd.go config+lncfg: move config structs to lncfg, drop suffix 2020-05-14 14:37:48 +02:00
caches.go lncfg/caches: adds Caches sub config 2019-04-01 16:34:04 -07:00
chain.go lncfg+sample-lnd.conf: add DNS seed flag to chain cfg 2020-11-13 09:49:18 +01:00
config.go lnd+lncfg: move normalizeNetwork to lncfg 2020-10-29 15:20:00 -04:00
db_test.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
db.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
healthcheck.go healthcheck: add healthcheck to shutdown if cert is expired (#4792) 2020-12-01 18:34:19 -08:00
interface.go lncfg/interface: define Validator iface + variadic Validate 2019-04-01 16:33:50 -07:00
monitoring_off.go rpcserver+monitoring/config: enable Prometheus monitoring. 2019-06-11 11:26:09 -07:00
monitoring_on.go rpcserver+monitoring/config: enable Prometheus monitoring. 2019-06-11 11:26:09 -07:00
neutrino.go Merge pull request #4353 from LN-Zap/feat/neutrino-user-agent 2020-09-23 16:45:19 -07:00
protocol_experimental_off.go lncfg: split off protocol options into normal and legacy, normal reqs no build tag 2020-07-10 16:27:12 -07:00
protocol_experimental_on.go lncfg: split off protocol options into normal and legacy, normal reqs no build tag 2020-07-10 16:27:12 -07:00
protocol_legacy_off.go lncfg: add new legacy protocol option to turn off gossip throttling 2020-11-30 16:38:53 -08:00
protocol_legacy_on.go lncfg: add new legacy protocol option to turn off gossip throttling 2020-11-30 16:38:53 -08:00
protocol.go server+lncfg: add new config flag to enable wumbo channels 2020-07-10 16:27:13 -07:00
routing.go multi: remove experimential build flag for assumechanvalid 2020-10-21 14:13:50 +02:00
tor.go config+lncfg: move config structs to lncfg, drop suffix 2020-05-14 14:37:48 +02:00
watchtower.go lncfg: add Watchtower config 2019-06-13 19:54:19 -07:00
workers_test.go config: add sanity check to prevent non-negative worker counts 2019-03-13 20:32:52 -07:00
workers.go lncfg/workers: reduce default write pool workers to 8 2019-04-22 16:30:27 -07:00
wtclient.go lncfg: show deprecated warning for wtclient.private-tower-uris option 2019-09-25 14:41:26 -07:00