ability to create multiple contracts with a single password for testing purposes
This commit is contained in:
parent
775b043209
commit
6f808cfeb0
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue