File tree 1 file changed +1
-5
lines changed
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1004,6 +1004,7 @@ func (h *BasicHost) AllAddrs() []ma.Multiaddr {
1004
1004
return finalAddrs
1005
1005
}
1006
1006
1007
+ // addCertHashes adds certhashes to the relevant addresses. It modifies `addrs` in place.
1007
1008
func (h * BasicHost ) addCertHashes (addrs []ma.Multiaddr ) []ma.Multiaddr {
1008
1009
// This is a temporary workaround/hack that fixes #2233. Once we have a
1009
1010
// proper address pipeline, rework this. See the issue for more context.
@@ -1020,11 +1021,6 @@ func (h *BasicHost) addCertHashes(addrs []ma.Multiaddr) []ma.Multiaddr {
1020
1021
return addrs
1021
1022
}
1022
1023
1023
- // Copy addrs slice since we'll be modifying it.
1024
- addrsOld := addrs
1025
- addrs = make ([]ma.Multiaddr , len (addrsOld ))
1026
- copy (addrs , addrsOld )
1027
-
1028
1024
for i , addr := range addrs {
1029
1025
wtOK , wtN := libp2pwebtransport .IsWebtransportMultiaddr (addr )
1030
1026
webrtcOK , webrtcN := libp2pwebrtc .IsWebRTCDirectMultiaddr (addr )
You can’t perform that action at this time.
0 commit comments