Skip to content

Commit fa96777

Browse files
committed
p2p fixes
1 parent f566bbe commit fa96777

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

framework/components/clnode/clnode.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,21 @@ func natPortsToK8sFormat(nat nat.PortMap) []string {
198198
// exposes custom_ports in format "host:docker" or map 1-to-1 if only "host" port is provided
199199
func generatePortBindings(in *Input) ([]string, nat.PortMap, error) {
200200
httpPort := fmt.Sprintf("%s/tcp", DefaultHTTPPort)
201-
exposedPorts := []string{httpPort}
201+
p2pPort := fmt.Sprintf("%s/udp", DefaultP2PPort)
202+
exposedPorts := []string{httpPort, p2pPort}
202203
portBindings := nat.PortMap{
203204
nat.Port(httpPort): []nat.PortBinding{
204205
{
205206
HostIP: "0.0.0.0",
206207
HostPort: strconv.Itoa(in.Node.HTTPPort),
207208
},
208209
},
210+
nat.Port(p2pPort): []nat.PortBinding{
211+
{
212+
HostIP: "0.0.0.0",
213+
HostPort: strconv.Itoa(in.Node.P2PPort),
214+
},
215+
},
209216
}
210217
if os.Getenv("CTF_CLNODE_DLV") == "true" {
211218
innerDebuggerPort := fmt.Sprintf("%d/tcp", DefaultDebuggerPort)

framework/components/fake/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func NewWithContext(ctx context.Context, in *Input) (*Output, error) {
6060
}
6161
in.Out = &Output{
6262
BaseURLHost: fmt.Sprintf("http://%s:%d", fmt.Sprintf("%s-svc", containerName), in.Port),
63-
BaseURLDocker: fmt.Sprintf("http://%s:%d", containerName, in.Port),
63+
BaseURLDocker: fmt.Sprintf("http://%s:%d", fmt.Sprintf("%s-svc", containerName), in.Port),
6464
}
6565
return in.Out, nil
6666
}

0 commit comments

Comments
 (0)