multi: make NewChanIDFromOutpoint accept value instead of pointer

This commit is contained in:
Keagan McClelland committed 2024-03-08 15:47:55 -08:00
1 parent fd1cd315ce
commit db39a905cb
27 files changed
+108 -106

No files matched your search

+2 -2
View File
@@ -391,7 +391,7 @@ func (m *ChanStatusManager) processEnableRequest(outpoint wire.OutPoint,
// Quickly check to see if the requested channel is active within the
// htlcswitch and return an error if it isn't.
chanID := lnwire.NewChanIDFromOutPoint(&outpoint)
chanID := lnwire.NewChanIDFromOutPoint(outpoint)
if !m.cfg.IsChannelActive(chanID) {
return ErrEnableInactiveChan
}
@@ -531,7 +531,7 @@ func (m *ChanStatusManager) markPendingInactiveChannels() {
// If our bookkeeping shows the channel as active, sample the
// htlcswitch to see if it believes the link is also active. If
// so, we will skip marking it as ChanStatusPendingDisabled.
chanID := lnwire.NewChanIDFromOutPoint(&c.FundingOutpoint)
chanID := lnwire.NewChanIDFromOutPoint(c.FundingOutpoint)
if m.cfg.IsChannelActive(chanID) {
continue
}
+2 -2
View File
@@ -391,7 +391,7 @@ func (h *testHarness) markActive(channels []*channeldb.OpenChannel) {
h.t.Helper()
for _, channel := range channels {
chanID := lnwire.NewChanIDFromOutPoint(&channel.FundingOutpoint)
chanID := lnwire.NewChanIDFromOutPoint(channel.FundingOutpoint)
h.htlcSwitch.SetStatus(chanID, true)
}
}
@@ -402,7 +402,7 @@ func (h *testHarness) markInactive(channels []*channeldb.OpenChannel) {
h.t.Helper()
for _, channel := range channels {
chanID := lnwire.NewChanIDFromOutPoint(&channel.FundingOutpoint)
chanID := lnwire.NewChanIDFromOutPoint(channel.FundingOutpoint)
h.htlcSwitch.SetStatus(chanID, false)
}
}