From 9375a2b4b0564b824803631b53b34bd60bb239d3 Mon Sep 17 00:00:00 2001 From: Jaynti Kanani Date: Tue, 16 Mar 2021 19:43:54 +0530 Subject: [PATCH] fix: docker script --- src/setup/devnet/index.js | 4 ++-- src/setup/devnet/templates/docker/docker-ganache-start.sh.njk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/setup/devnet/index.js b/src/setup/devnet/index.js index 587f1c73..871a8dc0 100644 --- a/src/setup/devnet/index.js +++ b/src/setup/devnet/index.js @@ -329,8 +329,8 @@ export class Devnet { // set genesis addresses this.config.genesisAddresses = genesisAddresses - // setup accounts from signer dump data - this.config.accounts = this.signerDumpData.map(s => { + // setup accounts from signer dump data (based on number of validators) + this.config.accounts = this.signerDumpData.slice(0, this.config.numOfValidators).map(s => { return getAccountFromPrivateKey(s.priv_key) }) } diff --git a/src/setup/devnet/templates/docker/docker-ganache-start.sh.njk b/src/setup/devnet/templates/docker/docker-ganache-start.sh.njk index 33f940d4..73752fc0 100644 --- a/src/setup/devnet/templates/docker/docker-ganache-start.sh.njk +++ b/src/setup/devnet/templates/docker/docker-ganache-start.sh.njk @@ -4,7 +4,7 @@ set -x #echo on DATA_DIR={{ ganache.dbName }} -docker-compose run --service-ports --name ganache ganache --hardfork istanbul \ +docker-compose run --rm --service-ports --name ganache ganache --hardfork istanbul \ --blockTime 1 \ --db /root/data/$DATA_DIR \ {% for acc in obj.config.accounts %}--account {{ acc.privateKey }},1000000000000000000000 {% endfor %}\