ability to create multiple contracts with a single password for testing purposes

This commit is contained in:
VoR0220 2015-09-14 19:58:52 -05:00
parent 775b043209
commit 6f808cfeb0
3 changed files with 9 additions and 9 deletions

View File

@ -7,20 +7,19 @@ development:
datadir: /tmp/embark
chains: config/chains/development.json
mine_when_needed: true
max_peers: 0
gas_limit: 500000
gas_price: 10000000000000
console: false
account:
init: true
password: config/password
num: 1
staging:
rpc_host: localhost
rpc_port: 8101
rpc_whitelist: "*"
datadir: default
network_id: 0
max_peers: 4
console: true
account:
init: false
@ -31,7 +30,6 @@ production:
rpc_whitelist: "*"
datadir: default
network_id: 1
max_peers: 4
console: true
account:
init: false

View File

@ -105,12 +105,15 @@ Blockchain.prototype.get_address = function() {
console.log("=== already initialized");
address = result.output.match(/{(\w+)}/)[1];
} else {
console.log("running: " + this.init_command());
result = exec(this.init_command());
address = result.output.match(/{(\w+)}/)[1];
console.log("running: " + this.init_command() + " " + this.account.num + " time(s)");
result = '';
for (var i = 0; i < this.account.num; i++){
result = exec(this.init_command()) + '\n';
address = result.output.match(/{(\w+)}/)[1]; //TODO: Write a proper reg expression to match multiple lines of output...not my forte
}
}
}
if (this.account.num > 1) return exec(this.list_command());
return address;
}

View File

@ -41,7 +41,6 @@ BlockchainConfig.prototype.config = function(env) {
genesisBlock: config.genesis_block,
datadir: config.datadir,
chains: config.chains,
deployTimeout: config.deploy_timeout || 20,
networkId: networkId,
maxPeers: 4,
port: config.port || "30303",
@ -54,4 +53,4 @@ BlockchainConfig.prototype.config = function(env) {
return config;
};
module.exports = BlockchainConfig;
module.exports = BlockchainConfig;