Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions boilerplate/config/blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ development:
account:
init: true
password: config/password
num: 1
staging:
rpc_host: localhost
rpc_port: 8101
Expand All @@ -22,6 +23,9 @@ staging:
network_id: 0
max_peers: 4
console: true
bootnodes:
boot: false
enodes: [] #insert enode urls here.
account:
init: false
address:
Expand All @@ -33,6 +37,9 @@ production:
network_id: 1
max_peers: 4
console: true
bootnodes:
boot: false
enodes: []
account:
init: false
address:
6 changes: 6 additions & 0 deletions lib/blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ Blockchain.prototype.run_command = function(address, use_tmp) {
cmd += "--unlock " + address + " ";
}

if (config.bootNodes.init == true){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VoR0220 is this meant to be boot instead of init?

cmd += "--bootnodes ";
for (var i = 0; i < config.bootNodes.enodes.length; i++){
cmd += config.bootNodes.enodes[i] + " ";
}
}
if (config.console_toggle) {
cmd += "console";
}
Expand Down
4 changes: 3 additions & 1 deletion lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ Compiler.prototype.compile_solidity = function(contractFile) {
output = result.output;

if (result.code === 1) {
throw new Error(result.output);
if (version == '0.1.1' || version == '0.1.0'){
throw new Error(result.output);
}
}

json = JSON.parse(output).contracts;
Expand Down
4 changes: 3 additions & 1 deletion lib/config/blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ BlockchainConfig.prototype.config = function(env) {
else {
networkId = config.network_id;
}


config = {
rpcHost: config.rpc_host,
Expand All @@ -41,9 +42,10 @@ BlockchainConfig.prototype.config = function(env) {
genesisBlock: config.genesis_block,
datadir: config.datadir,
chains: config.chains,
bootNodes: config.bootnodes,
deployTimeout: config.deploy_timeout || 20,
networkId: networkId,
maxPeers: 4,
maxPeers: config.max_peers || 4,
port: config.port || "30303",
console_toggle: config.console || false,
mine_when_needed: config.mine_when_needed || false,
Expand Down