Skip to content
Snippets Groups Projects
Commit 03eb18ba authored by pini's avatar pini
Browse files

feat: env vars for cpu and nbCores pow parameters

DUNITER_POW_CPU
DUNITER_POW_NBCORES
parent 2ae2c87d
No related branches found
No related tags found
1 merge request!1405feat: env vars for cpu and nbCores pow parameters
......@@ -22,6 +22,14 @@ By default this keypair is random, so the duniter node is a mirror node.
To modify the keypair of the node, you must create a keypair in a file and indicate the path to this file with the environment variable `DUNITER_KEYFILE`.
## Configuring the proof of work parameters
The PoW prefix, cpu usage, and number of workers can be configured with these environment variables:
* `DUNITER_POW_PREFIX` (integer)
* `DUNITER_POW_CPU` (decimal number between 0 and 1)
* `DUNITER_POW_NBCORES` (integer)
## Configuring the network
### The APIs
......
......@@ -485,8 +485,8 @@ function commandLineConf(program:any, conf:any = {}) {
conf = conf || {};
const cli = {
currency: program.currency,
cpu: program.cpu,
nbCores: program.nbCores,
cpu: process.env.DUNITER_POW_CPU ? parseFloat(process.env.DUNITER_POW_CPU) : program.cpu,
nbCores: process.env.DUNITER_POW_NBCORES ? parseInt(process.env.DUNITER_POW_NBCORES) : program.nbCores,
prefix: program.prefix,
server: {
port: program.port,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment