diff --git a/codex/rest/api.nim b/codex/rest/api.nim index 6069a299..04f1218b 100644 --- a/codex/rest/api.nim +++ b/codex/rest/api.nim @@ -46,33 +46,6 @@ proc validate( {.gcsafe, raises: [Defect].} = 0 -proc formatEnginePeers(peers: OrderedTable[PeerId, BlockExcPeerCtx]): JsonNode = - let jarray = newJArray() - for key, value in peers: - jarray.add(%* - { - "peerId": $key, - "context": { - "blocks": value.blocks.len, - "peerWants": value.peerWants.len, - "exchanged": value.exchanged, - "lastExchange": $(value.lastExchange), - } - }) - - return jarray - -proc formatSwitchPeers(peers: Table[PeerId, seq[MultiAddress]]): JsonNode = - let jarray = newJArray() - for key, value in peers: - jarray.add(%* - { - "peerId": $key, - "numberOfAddresses": $value.len - }) - - return jarray - proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter = var router = RestRouter.init(validate) router.api( @@ -272,8 +245,6 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter = node.discovery.dhtRecord.get.toURI else: "", - "enginePeers": formatEnginePeers(node.engine.peers.peers), - "switchPeers": formatSwitchPeers(node.switch.peerStore[AddressBook].book), "codex": { "version": $codexVersion, "revision": $codexRevision diff --git a/docker/debug/buildlocal.bat b/docker/debug/buildlocal.bat deleted file mode 100644 index 647eff42..00000000 --- a/docker/debug/buildlocal.bat +++ /dev/null @@ -1,2 +0,0 @@ -docker build -t thatbenbierens/codexlocal:latest -f codex.Dockerfile .. -docker push thatbenbierens/codexlocal:latest diff --git a/docker/debug/buildsetup.bat b/docker/debug/buildsetup.bat deleted file mode 100644 index d5288108..00000000 --- a/docker/debug/buildsetup.bat +++ /dev/null @@ -1,2 +0,0 @@ -docker build -t thatbenbierens/codexsetup:latest -f setup.Dockerfile .. -docker push thatbenbierens/codexsetup:latest diff --git a/docker/debug/local.Dockerfile b/docker/debug/local.Dockerfile deleted file mode 100644 index 33e160c9..00000000 --- a/docker/debug/local.Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM thatbenbierens/codexsetup:latest AS builder -WORKDIR /src -COPY ./codex ./codex -COPY ./docker ./docker -RUN make NIM_PARAMS="-d:disableMarchNative" - -FROM alpine:3.17.2 -WORKDIR /root/ -RUN apk add --no-cache openssl libstdc++ libgcc libgomp -COPY --from=builder /src/build/codex ./ -COPY --from=builder /src/docker/startCodex.sh ./ -CMD ["sh", "startCodex.sh"] diff --git a/docker/debug/setup.Dockerfile b/docker/debug/setup.Dockerfile deleted file mode 100644 index 7dea95bb..00000000 --- a/docker/debug/setup.Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM nimlang/nim:1.6.10-alpine AS builder -WORKDIR /src -RUN apk update && apk add git cmake curl make git bash linux-headers -COPY . . -RUN make clean -RUN make update