diff --git a/htlcswitch/interfaces.go b/htlcswitch/interfaces.go index ac3e10bab..efaf28fa3 100644 --- a/htlcswitch/interfaces.go +++ b/htlcswitch/interfaces.go @@ -221,7 +221,7 @@ type ChannelLink interface { IsUnadvertised() bool // ChannelPoint returns the channel outpoint for the channel link. - ChannelPoint() *wire.OutPoint + ChannelPoint() wire.OutPoint // ShortChanID returns the short channel ID for the channel link. The // short channel ID encodes the exact location in the main chain that diff --git a/htlcswitch/link.go b/htlcswitch/link.go index d6d1d55d5..e80c7650c 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -1090,8 +1090,8 @@ func (l *channelLink) htlcManager() { // ActiveLinkEvent. We'll also defer an inactive link notification for // when the link exits to ensure that every active notification is // matched by an inactive one. - l.cfg.NotifyActiveLink(*l.ChannelPoint()) - defer l.cfg.NotifyInactiveLinkEvent(*l.ChannelPoint()) + l.cfg.NotifyActiveLink(l.ChannelPoint()) + defer l.cfg.NotifyInactiveLinkEvent(l.ChannelPoint()) // TODO(roasbeef): need to call wipe chan whenever D/C? @@ -1215,8 +1215,8 @@ func (l *channelLink) htlcManager() { // we can go ahead and send the active channel notification. We'll also // defer the inactive notification for when the link exits to ensure // that every active notification is matched by an inactive one. - l.cfg.NotifyActiveChannel(*l.ChannelPoint()) - defer l.cfg.NotifyInactiveChannel(*l.ChannelPoint()) + l.cfg.NotifyActiveChannel(l.ChannelPoint()) + defer l.cfg.NotifyInactiveChannel(l.ChannelPoint()) // With the channel states synced, we now reset the mailbox to ensure // we start processing all unacked packets in order. This is done here @@ -2558,9 +2558,8 @@ func (l *channelLink) PeerPubKey() [33]byte { // ChannelPoint returns the channel outpoint for the channel link. // NOTE: Part of the ChannelLink interface. -func (l *channelLink) ChannelPoint() *wire.OutPoint { - chanPoint := l.channel.ChannelPoint() - return &chanPoint +func (l *channelLink) ChannelPoint() wire.OutPoint { + return l.channel.ChannelPoint() } // ShortChanID returns the short channel ID for the channel link. The short diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index e995b3ed7..6770c949f 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -907,7 +907,10 @@ func (f *mockChannelLink) PeerPubKey() [33]byte { return f.peer.PubKey() } -func (f *mockChannelLink) ChannelPoint() *wire.OutPoint { return &wire.OutPoint{} } +func (f *mockChannelLink) ChannelPoint() wire.OutPoint { + return wire.OutPoint{} +} + func (f *mockChannelLink) Stop() {} func (f *mockChannelLink) EligibleToForward() bool { return f.eligible } func (f *mockChannelLink) MayAddOutgoingHtlc(lnwire.MilliSatoshi) error { return nil }