lnd.xprv/channeldb/migration_01_to_11
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
..
zpay32 channeldb/migration_01_to_11: isolate zpay32 decoding 2020-07-24 13:13:47 -07:00
addr.go channeldb: make copy for migrations 2019-10-24 12:49:38 +02:00
channel_test.go channeldb/migration_01_to_11: remove unused code 2019-10-31 07:18:36 +01:00
channel.go channeldb/migration_01_to_11: remove unused code 2019-10-31 07:18:36 +01:00
codec.go channeldb/migration_01_to_11: remove unused code 2019-10-31 07:18:36 +01:00
db.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
error.go migration_01_to_11: remove version checking for migration tests 2019-10-31 11:25:07 +01:00
graph_test.go multi: remove LocalFeatures and GlobalFeatures 2019-11-08 05:32:00 -08:00
graph.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
invoices.go multi: add reset closure to kvdb.View 2020-11-05 17:57:12 +01:00
legacy_serialization.go channeldb: make copy for migrations 2019-10-24 12:49:38 +02:00
log.go channeldb: initialize migrations logger 2019-10-30 08:56:18 +01:00
meta_test.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
meta.go channeldb: convert to uniformly use new kvdb abstractions 2020-03-18 19:34:49 -07:00
migration_09_legacy_serialization.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
migration_10_route_tlv_records.go channeldb: convert to uniformly use new kvdb abstractions 2020-03-18 19:34:49 -07:00
migration_11_invoices_test.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
migration_11_invoices.go channeldb/migration_01_to_11: isolate zpay32 decoding 2020-07-24 13:13:47 -07:00
migrations_test.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
migrations.go channeldb: convert to uniformly use new kvdb abstractions 2020-03-18 19:34:49 -07:00
options.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
payment_control.go multi: rename: ReadBucket to RBucket 2020-05-26 18:21:08 -07:00
payments_test.go channeldb/migration_01_to_11: remove unused code 2019-10-31 07:18:36 +01:00
payments.go multi: add reset closure to kvdb.View 2020-11-05 17:57:12 +01:00
route.go channeldb/migration_01_to_11: isolate route structure 2019-12-12 00:12:17 +01:00