Removes unused debug support

This commit is contained in:
benbierens 2023-06-15 08:42:41 +02:00
parent cf493ce157
commit 3b02778370
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
5 changed files with 0 additions and 51 deletions

View File

@ -46,33 +46,6 @@ proc validate(
{.gcsafe, raises: [Defect].} = {.gcsafe, raises: [Defect].} =
0 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 = proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
var router = RestRouter.init(validate) var router = RestRouter.init(validate)
router.api( router.api(
@ -272,8 +245,6 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
node.discovery.dhtRecord.get.toURI node.discovery.dhtRecord.get.toURI
else: else:
"", "",
"enginePeers": formatEnginePeers(node.engine.peers.peers),
"switchPeers": formatSwitchPeers(node.switch.peerStore[AddressBook].book),
"codex": { "codex": {
"version": $codexVersion, "version": $codexVersion,
"revision": $codexRevision "revision": $codexRevision

View File

@ -1,2 +0,0 @@
docker build -t thatbenbierens/codexlocal:latest -f codex.Dockerfile ..
docker push thatbenbierens/codexlocal:latest

View File

@ -1,2 +0,0 @@
docker build -t thatbenbierens/codexsetup:latest -f setup.Dockerfile ..
docker push thatbenbierens/codexsetup:latest

View File

@ -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"]

View File

@ -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