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
1 change: 1 addition & 0 deletions demo/config/blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ staging:
rpc_whitelist: "*"
datadir: default
network_id: 0
deploy_timeout: 45
console: true
account:
init: false
Expand Down
1 change: 1 addition & 0 deletions lib/config/blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ 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",
Expand Down
3 changes: 1 addition & 2 deletions lib/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Deploy.prototype.deploy_contract = function(contractObject, contractParams) {
while ((receipt = web3.eth.getTransactionReceipt(transactionHash)) === null || receipt.contractAddress === null) {
sleep(1000);
time += 1;
if (time >= 20) {
if (time >= this.blockchainConfig.deployTimeout) {
return false;
}
}
Expand Down Expand Up @@ -176,4 +176,3 @@ Deploy.prototype.generate_and_write_abi_file = function(destFile) {
};

module.exports = Deploy;

3 changes: 3 additions & 0 deletions test/config.blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe('embark.config.blockchain', function() {
genesis_block: 'config/genesis.json',
datadir: '/tmp/embark',
chains: 'chains_development.json',
deploy_timeout: 45,
mine_when_needed: true,
gas_limit: 123,
gas_price: 100,
Expand All @@ -69,6 +70,7 @@ describe('embark.config.blockchain', function() {
genesisBlock: 'config/genesis.json',
datadir: '/tmp/embark',
chains: 'chains_development.json',
deployTimeout: 45,
networkId: 0,
maxPeers: 4,
port: "30303",
Expand Down Expand Up @@ -114,6 +116,7 @@ describe('embark.config.blockchain', function() {
genesisBlock: undefined,
datadir: '/tmp/embark',
chains: undefined,
deployTimeout: 20,
networkId: 0,
maxPeers: 4,
port: "30303",
Expand Down