Skip to content

Commit

Permalink
Merge pull request #9377 from alingse/fix-nilnesserr
Browse files Browse the repository at this point in the history
fix check node1Err !=nil but return a nil value error err
  • Loading branch information
guggero authored Dec 20, 2024
2 parents fd4531c + a79fd08 commit 03eab4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions brontide/noise_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ func establishTestConnection(t testing.TB) (net.Conn, net.Conn, error) {

remote := <-remoteConnChan
if remote.err != nil {
return nil, nil, err
return nil, nil, remote.err
}

local := <-localConnChan
if local.err != nil {
return nil, nil, err
return nil, nil, local.err
}

t.Cleanup(func() {
Expand Down
4 changes: 2 additions & 2 deletions graph/db/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ func (c *ChannelGraph) addChannelEdge(tx kvdb.RwTx,
"for: %x: %w", edge.NodeKey1Bytes, err)
}
case node1Err != nil:
return err
return node1Err
}

_, node2Err := fetchLightningNode(nodes, edge.NodeKey2Bytes[:])
Expand All @@ -1146,7 +1146,7 @@ func (c *ChannelGraph) addChannelEdge(tx kvdb.RwTx,
"for: %x: %w", edge.NodeKey2Bytes, err)
}
case node2Err != nil:
return err
return node2Err
}

// If the edge hasn't been created yet, then we'll first add it to the
Expand Down

0 comments on commit 03eab4d

Please sign in to comment.