From 512b48a6d173dad22b853f47410e7dea424141eb Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 18 Oct 2024 18:44:48 +0200 Subject: [PATCH] refactor: network.MultiaddrDNSResolver chore to make sure we can switch to go-libp2p release as soon it happens --- core/node/libp2p/dns.go | 4 ++-- docs/examples/kubo-as-a-library/go.mod | 2 +- docs/examples/kubo-as-a-library/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- test/dependencies/go.mod | 2 +- test/dependencies/go.sum | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/node/libp2p/dns.go b/core/node/libp2p/dns.go index 1c56a2c0a87..5dd51b2d4bb 100644 --- a/core/node/libp2p/dns.go +++ b/core/node/libp2p/dns.go @@ -2,10 +2,10 @@ package libp2p import ( "github.com/libp2p/go-libp2p" - madns "github.com/multiformats/go-multiaddr-dns" + "github.com/libp2p/go-libp2p/core/network" ) -func MultiaddrResolver(rslv *madns.Resolver) (opts Libp2pOpts, err error) { +func MultiaddrResolver(rslv network.MultiaddrDNSResolver) (opts Libp2pOpts, err error) { opts.Opts = append(opts.Opts, libp2p.MultiaddrResolver(rslv)) return opts, nil } diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index f924103e130..599fb754d9d 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -6,7 +6,7 @@ go 1.23 // this if you copy this example. replace github.com/ipfs/kubo => ./../../.. -replace github.com/libp2p/go-libp2p => github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d +replace github.com/libp2p/go-libp2p => github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4 require ( github.com/ipfs/boxo v0.24.0 diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index a2e7d2e4fe5..ec8d1baed2e 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -465,8 +465,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d h1:xAUGH+UOC6gfcL7GIeMos0B8RJvCHcfhxiykmGiqSm8= -github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d/go.mod h1:TTwkIltN7SS41Lljqp+kuI8iKp/0iyqExGinvx5PWJg= +github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4 h1:5hLIM2ecurb5VpJCZo2XMcVuJ0mFmRFNRf0Ynwn5b4U= +github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4/go.mod h1:TTwkIltN7SS41Lljqp+kuI8iKp/0iyqExGinvx5PWJg= github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94= github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= diff --git a/go.mod b/go.mod index 66a3a2a1621..5a95971da12 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/ipfs/kubo go 1.23 -replace github.com/libp2p/go-libp2p => github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d +replace github.com/libp2p/go-libp2p => github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4 require ( bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc diff --git a/go.sum b/go.sum index e7a776f65b5..c9824f0fca8 100644 --- a/go.sum +++ b/go.sum @@ -543,8 +543,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d h1:xAUGH+UOC6gfcL7GIeMos0B8RJvCHcfhxiykmGiqSm8= -github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d/go.mod h1:TTwkIltN7SS41Lljqp+kuI8iKp/0iyqExGinvx5PWJg= +github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4 h1:5hLIM2ecurb5VpJCZo2XMcVuJ0mFmRFNRf0Ynwn5b4U= +github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4/go.mod h1:TTwkIltN7SS41Lljqp+kuI8iKp/0iyqExGinvx5PWJg= github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94= github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= diff --git a/test/dependencies/go.mod b/test/dependencies/go.mod index 74c56a186a3..28ec5a36bb6 100644 --- a/test/dependencies/go.mod +++ b/test/dependencies/go.mod @@ -4,7 +4,7 @@ go 1.23 replace github.com/ipfs/kubo => ../../ -replace github.com/libp2p/go-libp2p => github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d +replace github.com/libp2p/go-libp2p => github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4 require ( github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd diff --git a/test/dependencies/go.sum b/test/dependencies/go.sum index 6651787a380..5d6ee509e24 100644 --- a/test/dependencies/go.sum +++ b/test/dependencies/go.sum @@ -435,8 +435,8 @@ github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38y github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d h1:xAUGH+UOC6gfcL7GIeMos0B8RJvCHcfhxiykmGiqSm8= -github.com/libp2p/go-libp2p v0.36.3-0.20241009065418-fa09c6c99b1d/go.mod h1:TTwkIltN7SS41Lljqp+kuI8iKp/0iyqExGinvx5PWJg= +github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4 h1:5hLIM2ecurb5VpJCZo2XMcVuJ0mFmRFNRf0Ynwn5b4U= +github.com/libp2p/go-libp2p v0.36.3-0.20241017030843-b9cb861a98b4/go.mod h1:TTwkIltN7SS41Lljqp+kuI8iKp/0iyqExGinvx5PWJg= github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94= github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= github.com/libp2p/go-libp2p-kad-dht v0.26.1 h1:AazV3LCImYVkDUGAHx5lIEgZ9iUI2QQKH5GMRQU8uEA=