diff --git a/packages/embark/src/lib/modules/blockchain_process/gethClient.js b/packages/embark/src/lib/modules/blockchain_process/gethClient.js index 3010b4695..af3c21d36 100644 --- a/packages/embark/src/lib/modules/blockchain_process/gethClient.js +++ b/packages/embark/src/lib/modules/blockchain_process/gethClient.js @@ -73,6 +73,10 @@ class GethClient { cmd.push("--syncmode=" + config.syncMode); } + if(this.runAsArchival(config)) { + cmd.push("--gcmode=archive"); + } + if (config.account && config.account.password) { const resolvedPath = path.resolve(fs.dappPath(), config.account.password); cmd.push(`--password=${resolvedPath}`); @@ -135,6 +139,10 @@ class GethClient { return cmd; } + runAsArchival(config) { + return config.networkId === 1337 || config.archivalMode; + } + initGenesisCommmand() { let config = this.config; let cmd = this.bin + " " + this.commonOptions().join(' '); diff --git a/packages/embark/src/lib/modules/blockchain_process/parityClient.js b/packages/embark/src/lib/modules/blockchain_process/parityClient.js index 04560f828..2d54c5ecd 100644 --- a/packages/embark/src/lib/modules/blockchain_process/parityClient.js +++ b/packages/embark/src/lib/modules/blockchain_process/parityClient.js @@ -102,6 +102,10 @@ class ParityClient { } } + if(this.runAsArchival(config)) { + cmd.push("--pruning=archive"); + } + return cmd; } @@ -127,6 +131,10 @@ class ParityClient { return parsed; } + runAsArchival(config) { + return config.networkId === 1337 || config.archivalMode; + } + isSupportedVersion(parsedVersion) { let test; try {