mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 06:32:18 +02:00
autopilot/interface+agent: remove NodeKey from AttachmentDirective
Instead parse the pubkey bytes only when needed.
This commit is contained in:
@@ -366,11 +366,11 @@ func TestConstrainedPrefAttachmentSelectTwoVertexes(t *testing.T) {
|
||||
edge2Pub := edge2.Peer.PubKey()
|
||||
|
||||
switch {
|
||||
case bytes.Equal(directive.NodeKey.SerializeCompressed(), edge1Pub[:]):
|
||||
case bytes.Equal(directive.NodeKey.SerializeCompressed(), edge2Pub[:]):
|
||||
case bytes.Equal(directive.NodeID[:], edge1Pub[:]):
|
||||
case bytes.Equal(directive.NodeID[:], edge2Pub[:]):
|
||||
default:
|
||||
t1.Fatalf("attached to unknown node: %x",
|
||||
directive.NodeKey.SerializeCompressed())
|
||||
directive.NodeID[:])
|
||||
}
|
||||
|
||||
// As the number of funds available exceed the
|
||||
@@ -666,8 +666,8 @@ func TestConstrainedPrefAttachmentSelectSkipNodes(t *testing.T) {
|
||||
// We'll simulate a channel update by adding the nodes
|
||||
// we just establish channel with the to set of nodes
|
||||
// to be skipped.
|
||||
skipNodes[NewNodeID(directives[0].NodeKey)] = struct{}{}
|
||||
skipNodes[NewNodeID(directives[1].NodeKey)] = struct{}{}
|
||||
skipNodes[directives[0].NodeID] = struct{}{}
|
||||
skipNodes[directives[1].NodeID] = struct{}{}
|
||||
|
||||
// If we attempt to make a call to the Select function,
|
||||
// without providing any new information, then we
|
||||
|
Reference in New Issue
Block a user