lnd/routing
Elle Mouton dc353dc50e
multi: use MakeTestGraph everywhere for test graph creation
In this commit, we unify how all unit tests that make use of the graph
create their test ChannelGraph instance. This will make it easier to
ensure that once we plug in different graph DB implementations, that all
unit tests are run against all variants of the graph DB.

With this commit, `NewChannelGraph` is mainly only called via
`MakeTestGraph` for all tests _except_ for `TestGraphLoading` which
needs to be able to reload a ChannelGraph with the same backend. This
will be addressed in a follow-up commit once more helpers are defined.

Note that in all previous packages where we created a test graph using
`kvdb.GetBoltBackend`, we now need to add a `TestMain` function with a
call to `kvdb.RunTest` since the `MakeTestGraph` helper uses
`GetTestBackend` instead of `kvdb.GetBoltBackend` which requires an
embedded postgres instance to be running.
2025-05-22 14:14:42 +02:00
..
blindedpath multi: rename nolint:lll to nolint:ll 2024-12-02 09:14:21 +02:00
chainview multi: update walletdb package 2025-04-09 18:47:53 +02:00
localchans localchans: bugfix so that we always use the correct chanID 2025-01-14 08:14:02 +01:00
route routing+channeldb: let Vertex implement tlv.RecordProducer 2024-11-01 08:59:54 +02:00
shards multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
testdata routing: add private key attribute in router test 2021-06-23 18:13:02 +08:00
additional_edge.go multi+refactor: move models package to graph/db 2024-11-28 13:34:33 +02:00
additional_edge_test.go routing+refactor: let BlindedEdge carry BlindedPayment 2024-07-10 09:12:39 +02:00
bandwidth.go htlcswitch+routing: return IsHandled from AuxBandwidth 2025-03-13 12:26:50 -05:00
bandwidth_test.go htlcswitch+routing: add funding blob to PaymentBandwidth 2025-04-22 21:21:11 +02:00
blinding.go routing: improve lasthoppaylaod size calculation 2024-12-10 19:05:49 +01:00
blinding_test.go routing: Use NUMS point for blinded paths 2024-12-10 19:05:49 +01:00
control_tower.go multi: add more logging when fetching invoices and payments. 2025-04-18 16:33:39 +02:00
control_tower_test.go channeldb+routing: cache circuit and onion blob for htlc attempt 2025-02-10 11:28:23 +08:00
graph.go multi: remove the need for the graphsession package 2025-02-18 10:15:41 -03:00
heap.go routing: add inbound fee support to pathfinding 2024-03-31 18:12:28 +02:00
heap_test.go routing: optimize path finding structures 2019-10-24 21:38:07 -03:00
integrated_routing_context_test.go multi: update walletdb package 2025-04-09 18:47:53 +02:00
integrated_routing_test.go multi: remove the need for the graphsession package 2025-02-18 10:15:41 -03:00
log.go multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
missioncontrol.go routing: make sure failure message is valid 2025-04-30 17:43:58 +02:00
missioncontrol_state.go routing: separate MissionControl from MissionControlManager 2024-10-01 14:06:50 +02:00
missioncontrol_state_test.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
missioncontrol_store.go refactor: use a more straightforward return value 2025-02-28 17:09:56 +08:00
missioncontrol_store_test.go routing: remove paymentFailure pointer 2025-04-30 17:43:58 +02:00
missioncontrol_test.go multi: update walletdb package 2025-04-09 18:47:53 +02:00
mock_graph_test.go multi: remove the need for the graphsession package 2025-02-18 10:15:41 -03:00
mock_test.go htlcswitch+routing: return IsHandled from AuxBandwidth 2025-03-13 12:26:50 -05:00
nodepair.go routing: extended DirectedNodePair functionality 2019-08-13 18:45:06 +02:00
pathfind.go routing: rename routing Graph method 2025-02-18 07:59:57 -03:00
pathfind_test.go multi: use MakeTestGraph everywhere for test graph creation 2025-05-22 14:14:42 +02:00
payment_lifecycle.go routing: patch the hash field for legacy payments 2025-04-11 21:52:15 +08:00
payment_lifecycle_test.go routing: add regression test to catch the panic 2025-04-11 21:52:14 +08:00
payment_session.go multi: remove the need for the graphsession package 2025-02-18 10:15:41 -03:00
payment_session_source.go Merge pull request #9330 from ProofOfKeags/update/fn2 2024-12-09 12:56:23 +01:00
payment_session_test.go multi: remove the need for the graphsession package 2025-02-18 10:15:41 -03:00
probability_apriori.go trivial: Fix spelling errors 2023-09-21 22:35:33 -04:00
probability_apriori_test.go trivial: Fix spelling errors 2023-09-21 22:35:33 -04:00
probability_bimodal.go routing: refine amount scaling 2025-05-02 10:30:28 +02:00
probability_bimodal_test.go routing: refine amount scaling 2025-05-02 10:30:28 +02:00
probability_estimator.go routing: add probability estimator interface 2023-02-10 09:58:40 +01:00
probability_estimator_test.go routing: add probability benchmarks 2023-02-14 13:34:25 +01:00
README.md scripted-diff: replace ⛰ emoji with $ [skip ci] 2022-10-28 12:06:49 -04:00
result_interpretation.go routing: remove paymentFailureInfo 2025-04-30 17:43:57 +02:00
result_interpretation_test.go routing: remove paymentFailure pointer 2025-04-30 17:43:58 +02:00
router.go multi: add more logging when fetching invoices and payments. 2025-04-18 16:33:39 +02:00
router_test.go routing+autopilot: rename mission control store var 2025-05-22 14:14:41 +02:00
setup_test.go channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
unified_edges.go routing: rename routing Graph method 2025-02-18 07:59:57 -03:00
unified_edges_test.go multi+refactor: move models package to graph/db 2024-11-28 13:34: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