multi: use cache for source channels

This commit is contained in:
Oliver Gugger committed 2021-09-29 17:00:04 +02:00
1 parent 369c09be61
commit 15d3f62d5e
7 files changed
+37 -23

No files matched your search

+11
View File
@@ -2052,6 +2052,17 @@ func (s *Switch) getLink(chanID lnwire.ChannelID) (ChannelLink, error) {
return link, nil
}
// GetLinkByShortID attempts to return the link which possesses the target short
// channel ID.
func (s *Switch) GetLinkByShortID(chanID lnwire.ShortChannelID) (ChannelLink,
error) {
s.indexMtx.RLock()
defer s.indexMtx.RUnlock()
return s.getLinkByShortID(chanID)
}
// getLinkByShortID attempts to return the link which possesses the target
// short channel ID.
//