Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

update the signature of the Protocols method #142

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/ipfs/go-log v1.0.5
github.com/libp2p/go-buffer-pool v0.0.2
github.com/libp2p/go-libp2p-blankhost v0.2.0
github.com/libp2p/go-libp2p-core v0.10.0
github.com/libp2p/go-libp2p-core v0.10.1-0.20210920171028-61a54c107072
github.com/libp2p/go-libp2p-swarm v0.6.0
github.com/libp2p/go-libp2p-transport-upgrader v0.5.0
github.com/libp2p/go-msgio v0.0.6
github.com/multiformats/go-multiaddr v0.3.3
github.com/multiformats/go-multiaddr v0.4.1-0.20210920085215-fc723035a20c
github.com/multiformats/go-varint v0.0.6
)
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJB
github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8=
github.com/libp2p/go-libp2p-core v0.8.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8=
github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM=
github.com/libp2p/go-libp2p-core v0.10.0 h1:jFy7v5Muq58GTeYkPhGzIH8Qq4BFfziqc0ixPd/pP9k=
github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg=
github.com/libp2p/go-libp2p-core v0.10.1-0.20210920171028-61a54c107072 h1:Ig/HNi4tihW2Ze6Fkkp9jjLxPcpi0Ne9Pa+kw8oq3sE=
github.com/libp2p/go-libp2p-core v0.10.1-0.20210920171028-61a54c107072/go.mod h1:Ac52V2PMajsRlNG09aZWUpzDiY356vVuSVPOQ2H2VpQ=
github.com/libp2p/go-libp2p-mplex v0.4.1 h1:/pyhkP1nLwjG3OM+VuaNJkQT/Pqq73WzB3aDN3Fx1sc=
github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g=
github.com/libp2p/go-libp2p-peerstore v0.2.8 h1:nJghUlUkFVvyk7ccsM67oFA6kqUkwyCM1G4WPVMCWYA=
Expand Down Expand Up @@ -417,8 +418,9 @@ github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z
github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y=
github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI=
github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc=
github.com/multiformats/go-multiaddr v0.3.3 h1:vo2OTSAqnENB2rLk79pLtr+uhj+VAzSe3uef5q0lRSs=
github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0=
github.com/multiformats/go-multiaddr v0.4.1-0.20210920085215-fc723035a20c h1:0zl06Y//GWPa0vSCHrjutbKScJbYxCLgX6ZQNJL0+3Q=
github.com/multiformats/go-multiaddr v0.4.1-0.20210920085215-fc723035a20c/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM=
github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E=
github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo=
github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA=
Expand Down
6 changes: 4 additions & 2 deletions transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ func (t *RelayTransport) Proxy() bool {
return true
}

func (t *RelayTransport) Protocols() []int {
return []int{ma.P_CIRCUIT}
var protoCircuit = ma.ProtocolWithCode(ma.P_CIRCUIT)

func (t *RelayTransport) Protocols() []ma.Protocol {
return []ma.Protocol{protoCircuit}
}

func (r *RelayTransport) Close() error {
Expand Down