diff --git a/Makefile b/Makefile index e735ab44..b4fe4883 100644 --- a/Makefile +++ b/Makefile @@ -68,9 +68,9 @@ LIBSTORAGE_PARAMS := # By default, libstorage disables the restapi. To build libstorage with the rest # api enabled for remote debugging, use `make DEBUG=1 libstorage` ifeq ($(DEBUG),1) - LIBSTORAGE_PARAMS := $(LIBSTORAGE_PARAMS) -d:libstorage_DisableRestApi=0 + LIBSTORAGE_PARAMS := $(LIBSTORAGE_PARAMS) -d:LibstorageDisableRestApi=0 else ifeq ($(DEBUG),0) - LIBSTORAGE_PARAMS := $(LIBSTORAGE_PARAMS) -d:libstorage_DisableRestApi=1 + LIBSTORAGE_PARAMS := $(LIBSTORAGE_PARAMS) -d:LibstorageDisableRestApi=1 endif # we don't want an error here, so we can handle things later, in the ".DEFAULT" target diff --git a/library/storage_thread_requests/requests/node_lifecycle_request.nim b/library/storage_thread_requests/requests/node_lifecycle_request.nim index 6bc2b568..491847aa 100644 --- a/library/storage_thread_requests/requests/node_lifecycle_request.nim +++ b/library/storage_thread_requests/requests/node_lifecycle_request.nim @@ -27,7 +27,7 @@ from ../../../codex/codex import CodexServer, new, start, stop, close logScope: topics = "libstorage libstoragelifecycle" -const libstorage_DisableRestApi* {.booldefine.} = true +const LibstorageDisableRestApi* {.booldefine.} = true type NodeLifecycleMsgType* = enum CREATE_NODE @@ -141,8 +141,9 @@ proc createStorage( return err("Failed to create Storage: unable to get the private key.") let pk = privateKey.get() - when libstorage_DisableRestApi: + when LibstorageDisableRestApi: conf.apiBindAddress = string.none + debug "Rest API is disabled!" else: debug "Rest API is enabled!"