-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
invoicesrpc: remove direct access to ChannelGraph pointer
- Loading branch information
1 parent
9c2c95d
commit 02e6628
Showing
6 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package invoicesrpc | ||
|
||
import ( | ||
"github.com/lightningnetwork/lnd/graph/db/models" | ||
) | ||
|
||
// GraphSource defines the graph interface required by the invoice rpc server. | ||
type GraphSource interface { | ||
// FetchChannelEdgesByID attempts to look up the two directed edges for | ||
// the channel identified by the channel ID. If the channel can't be | ||
// found, then graphdb.ErrEdgeNotFound is returned. | ||
FetchChannelEdgesByID(chanID uint64) (*models.ChannelEdgeInfo, | ||
*models.ChannelEdgePolicy, *models.ChannelEdgePolicy, error) | ||
|
||
// IsPublicNode is a helper method that determines whether the node with | ||
// the given public key is seen as a public node in the graph from the | ||
// graph's source node's point of view. | ||
IsPublicNode(pubKey [33]byte) (bool, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters