Skip to content

Commit

Permalink
config+pathfind_test+notifications_test: format and fix newVertex import
Browse files Browse the repository at this point in the history
Run go fmt so config file is formatted correctly. Also rename
newVertex to NewVertex in pathfind_test and notifications_test
as it is now exported from the routing package.
  • Loading branch information
flaurida authored and Roasbeef committed Nov 16, 2017
1 parent 918ef28 commit 7408aa6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ type config struct {

NoNetBootstrap bool `long:"nobootstrap" description:"If true, then automatic network bootstrapping will not be attempted."`


NoEncryptWallet bool `long:"noencryptwallet" description:"If set, wallet will be encrypted using the default passphrase."`

TrickleDelay int `long:"trickledelay" description:"Time in milliseconds between each release of announcements to the network"`
Expand Down
12 changes: 6 additions & 6 deletions routing/notifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ func TestEdgeUpdateNotification(t *testing.T) {
// Create lookup map for notifications we are intending to receive. Entries
// are removed from the map when the anticipated notification is received.
var waitingFor = map[Vertex]int{
newVertex(node1.PubKey): 1,
newVertex(node2.PubKey): 2,
NewVertex(node1.PubKey): 1,
NewVertex(node2.PubKey): 2,
}

const numEdgePolicies = 2
Expand All @@ -466,7 +466,7 @@ func TestEdgeUpdateNotification(t *testing.T) {
}

edgeUpdate := ntfn.ChannelEdgeUpdates[0]
nodeVertex := newVertex(edgeUpdate.AdvertisingNode)
nodeVertex := NewVertex(edgeUpdate.AdvertisingNode)

if idx, ok := waitingFor[nodeVertex]; ok {
switch idx {
Expand Down Expand Up @@ -609,8 +609,8 @@ func TestNodeUpdateNotification(t *testing.T) {
// Create lookup map for notifications we are intending to receive. Entries
// are removed from the map when the anticipated notification is received.
var waitingFor = map[Vertex]int{
newVertex(node1.PubKey): 1,
newVertex(node2.PubKey): 2,
NewVertex(node1.PubKey): 1,
NewVertex(node2.PubKey): 2,
}

// Exactly two notifications should be sent, each corresponding to the
Expand All @@ -627,7 +627,7 @@ func TestNodeUpdateNotification(t *testing.T) {
}

nodeUpdate := ntfn.NodeUpdates[0]
nodeVertex := newVertex(nodeUpdate.IdentityKey)
nodeVertex := NewVertex(nodeUpdate.IdentityKey)
if idx, ok := waitingFor[nodeVertex]; ok {
switch idx {
case 1:
Expand Down
2 changes: 1 addition & 1 deletion routing/pathfind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func TestBasicGraphPathFinding(t *testing.T) {
if err != nil {
t.Fatalf("unable to fetch source node: %v", err)
}
sourceVertex := newVertex(sourceNode.PubKey)
sourceVertex := NewVertex(sourceNode.PubKey)

ignoredEdges := make(map[uint64]struct{})
ignoredVertexes := make(map[Vertex]struct{})
Expand Down

0 comments on commit 7408aa6

Please sign in to comment.