Documentation
¶
Index ¶
Constants ¶
View Source
const Subsystem = "LCHN"
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
Types ¶
type Manager ¶
type Manager struct {
// SelfPub contains the public key of the local node.
SelfPub *btcec.PublicKey
// DefaultRoutingPolicy is the default routing policy.
DefaultRoutingPolicy models.ForwardingPolicy
// UpdateForwardingPolicies is used by the manager to update active
// links with a new policy.
UpdateForwardingPolicies func(
chanPolicies map[wire.OutPoint]models.ForwardingPolicy)
// PropagateChanPolicyUpdate is called to persist a new policy to disk
// and broadcast it to the network.
PropagateChanPolicyUpdate func(
edgesToUpdate []discovery.EdgeWithInfo) error
// ForAllOutgoingChannels is required to iterate over all our local
// channels. The ChannelEdgePolicy parameter may be nil.
ForAllOutgoingChannels func(ctx context.Context,
cb func(*models.ChannelEdgeInfo,
*models.ChannelEdgePolicy) error, reset func()) error
// FetchChannel is used to query local channel parameters. Optionally an
// existing db tx can be supplied.
FetchChannel func(chanPoint wire.OutPoint) (*channeldb.OpenChannel,
error)
// AddEdge is used to add edge/channel to the topology of the router.
AddEdge func(ctx context.Context, edge *models.ChannelEdgeInfo) error
// contains filtered or unexported fields
}
Manager manages the node's local channels. The only operation that is currently implemented is updating forwarding policies.
func (*Manager) UpdatePolicy ¶
func (r *Manager) UpdatePolicy(ctx context.Context, newSchema routing.ChannelPolicy, createMissingEdge bool, chanPoints ...wire.OutPoint) ( []*lnrpc.FailedUpdate, error)
UpdatePolicy updates the policy for the specified channels on disk and in the active links.
Click to show internal directories.
Click to hide internal directories.