Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
256c8f8f
Unverified
Commit
256c8f8f
authored
Jul 26, 2021
by
Marten Seemann
Committed by
GitHub
Jul 26, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #161 from multiformats/remove-deprecated-swap-to-p2p-multiaddrs
remove deprecated SwapToP2pMultiaddrs
parents
0bc67b1e
d00fbc4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
17 deletions
+0
-17
protocol.go
protocol.go
+0
-17
No files found.
protocol.go
View file @
256c8f8f
...
...
@@ -50,23 +50,6 @@ var protocolsByCode = map[int]Protocol{}
// Protocols is the list of multiaddr protocols supported by this module.
var
Protocols
=
[]
Protocol
{}
// SwapToP2pMultiaddrs is a function to make the transition from /ipfs/...
// multiaddrs to /p2p/... multiaddrs easier
// The first stage of the rollout is to ship this package to all users so
// that all users of multiaddr can parse both /ipfs/ and /p2p/ multiaddrs
// as the same code (P_P2P). During this stage of the rollout, all addresses
// with P_P2P will continue printing as /ipfs/, so that older clients without
// the new parsing code won't break.
// Once the network has adopted the new parsing code broadly enough, users of
// multiaddr can add a call to this method to an init function in their codebase.
// This will cause any P_P2P multiaddr to print out as /p2p/ instead of /ipfs/.
// Note that the binary serialization of this multiaddr does not change at any
// point. This means that this code is not a breaking network change at any point
//
// DEPRECATED: this is now the default
func
SwapToP2pMultiaddrs
()
{
}
func
AddProtocol
(
p
Protocol
)
error
{
if
_
,
ok
:=
protocolsByName
[
p
.
Name
];
ok
{
return
fmt
.
Errorf
(
"protocol by the name %q already exists"
,
p
.
Name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment