Skip to content

Commit

Permalink
fix link local connection error
Browse files Browse the repository at this point in the history
Since libp2p/go-libp2p#2560, `0.0.0.0` is no longer valid as a peer connection address. This is causing issues for our tests so we change the IP to `127.0.0.1`.
  • Loading branch information
fredcarle committed Nov 11, 2023
1 parent afab2aa commit 6c96e23
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/peer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func createCID(doc *client.Document) (cid.Cid, error) {
return c, nil
}

const randomMultiaddr = "/ip4/0.0.0.0/tcp/0"
const randomMultiaddr = "/ip4/127.0.0.1/tcp/0"

func newTestNode(ctx context.Context, t *testing.T) (client.DB, *Node) {
store := memory.NewDatastore(ctx)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/net/order/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func executeTestCase(t *testing.T, test P2PTestCase) {

func randomNetworkingConfig() *config.Config {
cfg := config.DefaultConfig()
cfg.Net.P2PAddress = "/ip4/0.0.0.0/tcp/0"
cfg.Net.P2PAddress = "/ip4/127.0.0.1/tcp/0"
cfg.Net.RelayEnabled = false
return cfg
}
2 changes: 1 addition & 1 deletion tests/integration/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ func waitForSync(
func RandomNetworkingConfig() ConfigureNode {
return func() config.Config {
cfg := config.DefaultConfig()
cfg.Net.P2PAddress = "/ip4/0.0.0.0/tcp/0"
cfg.Net.P2PAddress = "/ip4/127.0.0.1/tcp/0"
cfg.Net.RelayEnabled = false
return *cfg
}
Expand Down

0 comments on commit 6c96e23

Please sign in to comment.