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 %}\