diff --git a/library/waku_thread/config.nim b/library/waku_thread/config.nim index c2f077fa67..b0565ef5fa 100644 --- a/library/waku_thread/config.nim +++ b/library/waku_thread/config.nim @@ -17,8 +17,8 @@ proc parsePrivateKey(jsonNode: JsonNode, jsonResp: var JsonEvent): bool = if not jsonNode.contains("key"): - jsonResp = JsonErrorEvent.new("The node key is missing."); - return false + privateKey = PrivateKey.random(Secp256k1, newRng()[]).tryGet() + return true if jsonNode["key"].kind != JsonNodeKind.JString: jsonResp = JsonErrorEvent.new("The node key should be a string.");