()
| 398 | if err != nil { |
| 399 | return fmt.Errorf("invalid peer address: %w", err) |
| 400 | } |
| 401 | |
| 402 | // Connect to peer |
| 403 | if err := db.ipfsNode.PeerHost.Connect(ctx, *peerInfo); err != nil { |
| 404 | return fmt.Errorf("failed to connect to peer: %w", err) |
| 405 | } |
| 406 | |
| 407 | // Tag peer to maintain connection |
| 408 | db.ipfsNode.PeerHost.ConnManager().TagPeer(peerInfo.ID, "keep", 100) |
| 409 | return nil |
| 410 | } |