Represents one node in the channel’s forwarding policy and restrictions. Note that this doesn’t directly map to
a single concept in the protocol, a few things have been combined for the sake of simplicity. Used to manage the
lightning “state machine” and check that HTLCs are added in accordance of the advertised policy.
Represents a simulated channel, and is responsible for managing addition and removal of HTLCs from the channel and
sanity checks. Channel state is tracked unidirectionally for each participant in the channel.
ForwardingError represents the various errors that we can run into when forwarding payments in a simulated network.
Since we’re not using real lightning nodes, these errors are not obfuscated and can be propagated to the sending
node and used for analysis.
Populates a network graph based on the set of simulated channels provided. This function only applies channel
announcements, which has the effect of adding the nodes in each channel to the graph, because LDK does not export
all of the fields required to apply node announcements. This means that we will not have node-level information
(such as features) available in the routing graph.