mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
feat(jsonrpc): add call returning git version (#919)
This commit is contained in:
parent
020712c0db
commit
811e82b12a
4
Makefile
4
Makefile
@ -99,6 +99,10 @@ endif
|
||||
# use a separate waku discv5 network with `protocol-id="d5waku"`
|
||||
NIM_PARAMS := $(NIM_PARAMS) -d:discv5_protocol_id:d5waku
|
||||
|
||||
# git version for JSON RPC call
|
||||
GIT_VERSION := "$(shell git describe --abbrev=6 --always --tags)"
|
||||
NIM_PARAMS := $(NIM_PARAMS) -d:git_version:\"$(GIT_VERSION)\"
|
||||
|
||||
deps: | deps-common nat-libs waku.nims rlnlib
|
||||
ifneq ($(USE_LIBBACKTRACE), 0)
|
||||
deps: | libbacktrace
|
||||
|
||||
@ -8,6 +8,9 @@ import
|
||||
logScope:
|
||||
topics = "debug api"
|
||||
|
||||
const
|
||||
git_version {.strdefine.} = "n/a"
|
||||
|
||||
proc installDebugApiHandlers*(node: WakuNode, rpcsrv: RpcServer) =
|
||||
|
||||
## Debug API version 1 definitions
|
||||
@ -17,3 +20,10 @@ proc installDebugApiHandlers*(node: WakuNode, rpcsrv: RpcServer) =
|
||||
debug "get_waku_v2_debug_v1_info"
|
||||
|
||||
return node.info()
|
||||
|
||||
rpcsrv.rpc("get_waku_v2_debug_v1_version") do() -> string:
|
||||
## Returns information about WakuNode
|
||||
debug "get_waku_v2_debug_v1_version"
|
||||
|
||||
return git_version
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user