lnd.xprv/htlcswitch
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
..
hodl htlcswitch/hodl: switch from debug tag to dev 2018-10-05 13:04:45 +09:00
hop record: move CustomRecordSet 2019-12-12 00:12:19 +01:00
circuit_map.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
circuit_test.go server+mod: use ECDH interface for sphinx router 2020-05-20 09:05:36 +02:00
circuit.go htlcswitch: move hop iterator into htlcswitch/hop package 2019-09-05 15:30:31 +02:00
decayedlog_test.go server+htlcswitch: auto compact sphinx DB too 2020-11-13 10:19:51 +01:00
decayedlog.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
failure_detail.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
failure.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
htlcnotifier.go htlcswitch: add notifications for forwards 2020-02-19 18:03:22 +02:00
interceptable_switch.go htlcswitch,rpc: expose onion blob for intercepts 2020-10-31 14:09:52 -03:00
interfaces.go watchtower/wtclient: parameterize backup task with channel type 2020-11-25 15:04:12 -08:00
link_isolated_test.go htlcswitch/test: add test cases that triggers empty commit sig 2019-11-06 09:21:21 +01:00
link_test.go htlcswitch/link_test: double timeouts 2020-12-04 10:50:43 +01:00
link.go link+peer: thread anchor tower client to link 2020-11-25 15:39:14 -08:00
linkfailure.go htlcswitch: add PermanentFailure to LinkFailureError 2020-11-04 10:50:28 +01:00
log.go htlcswitch/hop: fix logging 2019-09-09 13:52:35 +02:00
mailbox_test.go htlcswitch: change ForwardPackets to return error 2020-06-18 12:48:21 +03:00
mailbox.go htlcswitch: change ForwardPackets to return error 2020-06-18 12:48:21 +03:00
mock.go multi: move mockChainIO, mockNotifier to lntest/mock 2020-08-31 19:41:09 -04:00
packet.go htlcswitch: expose custom records on intercepted packet 2020-06-27 11:00:46 +02:00
payment_result_test.go htlcswitch: add cleanStore method 2020-10-06 10:46:03 +02:00
payment_result.go htlcswitch: add debug logs for fetching network result 2020-11-24 14:14:49 +01:00
sequencer.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
switch_test.go htlcswitch: remove fastsha256 in test 2020-06-24 18:08:38 +08:00
switch.go htlcswitch: add debug logs for fetching network result 2020-11-24 14:14:49 +01:00
test_utils.go htlcswitch/link_test: double timeouts 2020-12-04 10:50:43 +01:00