Removes unused debug support
This commit is contained in:
parent
cf493ce157
commit
3b02778370
|
@ -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
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
docker build -t thatbenbierens/codexlocal:latest -f codex.Dockerfile ..
|
|
||||||
docker push thatbenbierens/codexlocal:latest
|
|
|
@ -1,2 +0,0 @@
|
||||||
docker build -t thatbenbierens/codexsetup:latest -f setup.Dockerfile ..
|
|
||||||
docker push thatbenbierens/codexsetup:latest
|
|
|
@ -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"]
|
|
|
@ -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
|
|
Loading…
Reference in New Issue