Skip to content

Commit

Permalink
refactor: network.MultiaddrDNSResolver
Browse files Browse the repository at this point in the history
chore to make sure we can switch to go-libp2p release as soon it happens
  • Loading branch information
lidel committed Oct 18, 2024
1 parent 4889612 commit 512b48a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions core/node/libp2p/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion docs/examples/kubo-as-a-library/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/kubo-as-a-library/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion test/dependencies/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/dependencies/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 512b48a

Please sign in to comment.