channeldb: let AddrsForNode indicate if the node was found or not
Before this commit, the `(channeldb.DB).AddrsForNode` method treats the results from the channel db and the graph db slightly differently. It errors out if the channel db is unaware of the node in question but does not error out if the graph is unaware of the node. So this commit changes the logic slightly so that a "node-unknown" error from either backing source is not seen as an error.
This commit is contained in:
7 files changed
+112
-49
No files matched your search
@@ -219,7 +219,7 @@ func TestAddrsForNode(t *testing.T) {
|
||||
|
||||
// Now that we've created a link node, as well as a vertex for the
|
||||
// node, we'll query for all its addresses.
|
||||
nodeAddrs, err := fullDB.AddrsForNode(nodePub)
|
||||
_, nodeAddrs, err := fullDB.AddrsForNode(nodePub)
|
||||
require.NoError(t, err, "unable to obtain node addrs")
|
||||
|
||||
expectedAddrs := make(map[string]struct{})
|
||||
|
||||
Reference in new issue
Block a user