From 0b8e7ff83654b37a51b6f1611e4722f438bf9666 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Fri, 15 Dec 2017 21:54:07 +0100 Subject: [PATCH] routing: embed FeeSchema in ChannelPolicy This commit embeds the FeeSchema within the new struct ChannelPolicy, which also contains the TimeLockDelta for a channel. --- routing/router.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/routing/router.go b/routing/router.go index 5fae3c7fc..8ffebc842 100644 --- a/routing/router.go +++ b/routing/router.go @@ -94,6 +94,18 @@ type FeeSchema struct { FeeRate uint32 } +// ChannelPolicy holds the parameters that determine the policy we enforce +// when fowarding payments on a channel. These parameters are communicated +// to the rest of the network in ChannelUpdate messages. +type ChannelPolicy struct { + // FeeSchema holds the fee configuration for a channel. + FeeSchema + + // TimeLockDelta is the required HTLC timelock delta to be used + // when forwarding payments. + TimeLockDelta uint32 +} + // Config defines the configuration for the ChannelRouter. ALL elements within // the configuration MUST be non-nil for the ChannelRouter to carry out its // duties.