lnd.xprv/routing
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
..
chainview kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
localchans routing+lnrpc+lncli: allow setting min htlc policy 2019-12-11 00:17:08 +01:00
route channeldb: validate MPP options when registering attempts 2020-04-02 19:31:23 +02:00
testdata routing: fix max route length test 2019-12-20 11:00:03 +01:00
ann_validation.go routing: skip max htlc validation when capacity is 0 2019-04-18 21:57:38 -07:00
control_tower_test.go routing: return full htlc attempt from shard handler 2020-05-12 19:56:50 +02:00
control_tower.go routing: return full htlc attempt from shard handler 2020-05-12 19:56:50 +02:00
errors.go routing: remove unused code 2020-04-24 19:15:08 +02:00
graph.go multi: rename ReadTx to RTx 2020-05-26 18:20:37 -07:00
heap_test.go routing: optimize path finding structures 2019-10-24 21:38:07 -03:00
heap.go routing: limit routing info size during pathfinding 2019-12-20 11:00:05 +01:00
integrated_routing_context_test.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
integrated_routing_test.go routing+routerrpc: rename max_shards to max_parts 2020-04-22 14:49:19 +02:00
log.go routing: define subsystem constant 2019-12-11 00:17:04 +01:00
missioncontrol_state_test.go routing: stricter mission control state failure updates 2020-03-28 07:49:23 +01:00
missioncontrol_state.go routing: stricter mission control state failure updates 2020-03-28 07:49:23 +01:00
missioncontrol_store_test.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
missioncontrol_store.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
missioncontrol_test.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
missioncontrol.go routing: static check fix, time.Since instead of Now().Sub() 2020-04-24 19:15:08 +02:00
mock_graph_test.go routing/test: use fixed identifiers in test graph 2020-04-09 08:20:43 +02:00
mock_test.go router: call CleanStore on startup 2020-10-06 10:46:04 +02:00
nodepair.go routing: extended DirectedNodePair functionality 2019-08-13 18:45:06 +02:00
notifications_test.go multi: remove LocalFeatures and GlobalFeatures 2019-11-08 05:32:00 -08:00
notifications.go misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
pathfind_test.go routing: add proportional attempt cost 2020-09-08 15:47:08 +02:00
pathfind.go routing: add proportional attempt cost 2020-09-08 15:47:08 +02:00
payment_lifecycle_test.go routing/payment_lifecycle_test: add MPP test cases 2020-04-02 19:29:15 +02:00
payment_lifecycle.go routing: promote shard logs on resume and terminal failure to Info 2020-11-24 14:59:39 +01:00
payment_session_source.go routing: move payment session constructor 2020-04-16 16:25:24 +02:00
payment_session_test.go routing: move payment session constructor 2020-04-16 16:25:24 +02:00
payment_session.go routing: don't treat bad features as an unexpected error 2020-05-27 12:15:53 +02:00
probability_estimator_test.go routing: track amt ranges in mc 2019-11-22 11:17:28 +01:00
probability_estimator.go routing: track amt ranges in mc 2019-11-22 11:17:28 +01:00
README.md multi: fix formatting issues in packge README's 2017-03-27 16:25:25 -07:00
result_interpretation_test.go routing: continue trying after mpp timeout 2020-04-09 08:20:52 +02:00
result_interpretation.go routing: continue trying after mpp timeout 2020-04-09 08:20:52 +02:00
router_test.go routing+lnrpc: extend BuildRoute to accept raw payAddr 2020-11-25 16:32:02 -08:00
router.go Merge pull request #3367 from cfromknecht/batched-graph-updates 2020-11-25 18:40:40 -08:00
stats.go routing/router: log aggregate graph processing stats 2019-06-13 18:18:30 -07:00
unified_policies_test.go routing: use unified policy for path finding 2019-10-25 11:22:28 +02:00
unified_policies.go routing+routerrpc: add multiple outgoing channel restriction 2020-05-12 07:17:24 +02:00
validation_barrier_test.go routing/validation_barrier_test: test semaphore and quit 2018-05-08 16:32:08 -07:00
validation_barrier.go multi: move Route to sub-pkg routing/route 2019-04-29 14:52:33 +02:00

routing

Build Status MIT licensed GoDoc

The routing package implements authentication+validation of channel announcements, pruning of the channel graph, path finding within the network, sending outgoing payments into the network and synchronizing new peers to our channel graph state.

Installation and Updating

$ go get -u github.com/lightningnetwork/lnd/routing