htlcswitch+peer: pass BestHeight to ChannelLinkConfig

This allows non-test usages of ChannelLinkConfig to omit the raw
htlcswitch.Switch pointer.
This commit is contained in:
eugene committed 2021-08-10 17:15:49 -04:00
1 parent 90db8de6fe
commit 6c6e353597
4 files changed
+8 -2

No files matched your search

+1
View File
@@ -1119,6 +1119,7 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
link := NewChannelLink(
ChannelLinkConfig{
Switch: server.htlcSwitch,
BestHeight: server.htlcSwitch.BestHeight,
FwrdingPolicy: h.globalPolicy,
Peer: peer,
Circuits: server.htlcSwitch.CircuitModifier(),