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

Commit 147eb33

Browse files
committed
fix: initialize circuitAddr after initializing the protocol
1 parent 9e6dd2b commit 147eb33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

transport.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ var Protocol = ma.Protocol{
2020
VCode: ma.CodeToVarint(P_CIRCUIT),
2121
}
2222

23-
var circuitAddr ma.Multiaddr = ma.Cast(Protocol.VCode)
23+
var circuitAddr ma.Multiaddr
2424

2525
func init() {
2626
ma.AddProtocol(Protocol)
27+
circuitAddr = ma.Cast(Protocol.VCode)
2728
}
2829

2930
var _ transport.Transport = (*RelayTransport)(nil)

0 commit comments

Comments
 (0)