htlcswitch: add a new UpdateFeePolicy to ChannelLink interface

This commit adds a new method to the ChannelLink interface which is
meant to allow outside sub-system to update the forwarding policy of a
channel. This can be triggered either by a new RPC method, or
automatically by some sort of control system which seeks to optimize
fee revenue, or block off channels, etc.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-06-17 00:01:10 +02:00
1 parent cd10dc712f
commit 399d193e2c
2 files changed
+40 -1

No files matched your search

+10 -1
View File
@@ -57,8 +57,17 @@ type ChannelLink interface {
// short channel ID encodes the exact location in the main chain that
// the original funding output can be found.
ShortChanID() lnwire.ShortChannelID
// UpdateForwardingPolicy updates the forwarding policy for the target
// ChannelLink. Once updated, the link will use the new forwarding
// policy to govern if it an incoming HTLC should be forwarded or not.
UpdateForwardingPolicy(ForwardingPolicy)
// Bandwidth returns the amount of satoshis which current link might
// pass through channel link.
// pass through channel link. The value returned from this method
// represents the up to date available flow through the channel. This
// takes into account any forwarded but un-cleared HTLC's, and any
// HTLC's which have been set to the over flow queue.
Bandwidth() btcutil.Amount
// Stats return the statistics of channel link. Number of updates,