Skip to content
Merged
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
12 changes: 12 additions & 0 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,23 @@ func (n *Node) IPCEndpoint() string {

// HTTPEndpoint retrieves the current HTTP endpoint used by the protocol stack.
func (n *Node) HTTPEndpoint() string {
n.lock.Lock()
defer n.lock.Unlock()

if n.httpListener != nil {
return n.httpListener.Addr().String()
}
return n.httpEndpoint
}

// WSEndpoint retrieves the current WS endpoint used by the protocol stack.
func (n *Node) WSEndpoint() string {
n.lock.Lock()
defer n.lock.Unlock()

if n.wsListener != nil {
return n.wsListener.Addr().String()
}
return n.wsEndpoint
}

Expand Down
12 changes: 0 additions & 12 deletions p2p/simulations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ using the devp2p node stack rather than executing `main()`.
The nodes listen for devp2p connections and WebSocket RPC clients on random
localhost ports.

### DockerAdapter

The `DockerAdapter` is similar to the `ExecAdapter` but executes `docker run`
to run the node in a Docker container using a Docker image containing the
simulation binary at `/bin/p2p-node`.

The Docker image is built using `docker build` when the adapter is initialised,
meaning no prior setup is necessary other than having a working Docker client.

Each node listens on the external IP of the container and the default p2p and
RPC ports (`30303` and `8546` respectively).

## Network

A simulation network is created with an ID and default service (which is used
Expand Down
190 changes: 0 additions & 190 deletions p2p/simulations/adapters/docker.go

This file was deleted.

Loading