multi: use cache for source channels
This commit is contained in:
7 files changed
+37
-23
No files matched your search
@@ -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.
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user