Skip to content

Commit

Permalink
fix: lookup correct peer id in transport controller
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <christian@aperture.us>
  • Loading branch information
paralin committed Aug 2, 2024
1 parent 6c24c52 commit 3807bd3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions transport/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,11 @@ func (c *Controller) GetPeerLinks(peerID peer.ID) []link.Link {
// Returning nil ends execution.
// Returning an error triggers a retry with backoff.
func (c *Controller) Execute(ctx context.Context) error {
// lookup the peer id u
localPeerID := c.peerID

// Acquire a handle to the node.
c.le.
WithField("peer-id", localPeerID.String()).
WithField("peer-id", c.lookupPeerID.String()).
Debug("waiting for peer private key")
localPeer, _, localPeerRef, err := peer.GetPeerWithID(ctx, c.bus, localPeerID, false, nil)
localPeer, _, localPeerRef, err := peer.GetPeerWithID(ctx, c.bus, c.lookupPeerID, false, nil)
if err != nil {
return err
}
Expand All @@ -164,7 +161,7 @@ func (c *Controller) Execute(ctx context.Context) error {
return err
}

localPeerID, err = peer.IDFromPrivateKey(privKey)
localPeerID, err := peer.IDFromPrivateKey(privKey)
if err != nil {
return err
}
Expand Down

0 comments on commit 3807bd3

Please sign in to comment.