# README
routing
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
# Functions
DisableLog disables all library log output.
IsError is a helper function which is needed to have ability to check that returned error has specific error code.
New creates a new instance of the ChannelRouter with the specified configuration parameters.
SetLogWriter uses a specified io.Writer to output package logging info.
UseLogger uses a specified Logger to output package logging info.
# Constants
ErrIgnored is returned when the update have been ignored because this update can't bring us something new.
ErrInsufficientCapacity is returned when a path if found, yet the capacity of one of the channels in the path is insufficient to carry the payment.
ErrMaxHopsExceeded is returned when a candidate path is found, but the length of that path exceeds HopLimit.
ErrNoPathFound is returned when a path to the target destination does not exist in the graph.
ErrNoRouteFound is returned when the router is unable to find a valid route to the target destination after fees and time-lock limitations are factored in.
ErrOutdated is returned when the routing update already have been applied.
ErrTargetNotInNetwork is returned when the target of a path-finding or payment attempt isn't known to be within the current version of the channel graph.
HopLimit is the maximum number hops that is permissible as a route.
# Structs
ChannelEdgeUpdate is an update for a new channel within the ChannelGraph.
ChannelHop is an intermediate hop within the network with a greater multi-hop payment route.
ChannelRouter is the layer 3 router within the Lightning stack.
ClosedChanSummary is a summary of a channel that was detected as being closed by monitoring the blockchain.
Config defines the configuration for the ChannelRouter.
FeeSchema is the set fee configuration for a Lighting Node on the network.
Hop represents the forwarding details at a particular position within the final route.
LightningPayment describes a payment to be sent through the network to the final destination.
NetworkNodeUpdate is an update for a node within the Lightning Network.
Route represents a path through the channel graph which runs over one or more channels in succession.
TopologyChange represents a new set of modifications to the channel graph.
TopologyClient represents an intent to receive notifications from the channel router regarding changes to the topology of the channel graph.
# Interfaces
ChannelGraphSource represent the source of information about the topology of lightning network, it responsible for addition of nodes, edges and applying edges updates, return the current block with with out topology is synchronized.