Skip to content

Commit 7661e8c

Browse files
committed
Merge branch 'develop'
2 parents 9b3610c + 13c7497 commit 7661e8c

File tree

16 files changed

+76
-15
lines changed

16 files changed

+76
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
TODO
3+
.node-xmlhttprequest-sync-*

bin/embark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var deploy = function(env, embarkConfig) {
2525
}
2626

2727
program
28-
.version('0.7.0')
28+
.version('0.7.1')
2929

3030
program.command('new [name]').description('New application').action(function(name) {
3131
if (name === undefined) {

boilerplate/config/blockchain.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ development:
33
rpc_port: 8101
44
rpc_whitelist: "*"
55
minerthreads: 1
6+
genesis_block: config/genesis/dev_genesis.json
67
datadir: /tmp/embark
78
mine_when_needed: true
9+
max_peers: 0
810
gas_limit: 500000
911
gas_price: 10000000000000
1012
console: false
@@ -17,17 +19,19 @@ staging:
1719
rpc_whitelist: "*"
1820
datadir: default
1921
network_id: 0
22+
max_peers: 4
2023
console: true
2124
account:
2225
init: false
23-
address:
26+
address:
2427
production:
2528
rpc_host: localhost
2629
rpc_port: 8101
2730
rpc_whitelist: "*"
2831
datadir: default
2932
network_id: 1
33+
max_peers: 4
3034
console: true
3135
account:
3236
init: false
33-
address:
37+
address:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"nonce": "0x0000000000000042",
3+
"difficulty": "0x40000",
4+
"alloc": {
5+
},
6+
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
7+
"coinbase": "0x0000000000000000000000000000000000000000",
8+
"timestamp": "0x00",
9+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
10+
"extraData": "0x",
11+
"gasLimit": "0x4c4b40"
12+
}

boilerplate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"license": "ISC",
1111
"homepage": "",
1212
"devDependencies": {
13-
"embark-framework": "^0.7.0",
13+
"embark-framework": "^0.7.1",
1414
"grunt-embark": "^0.2.0",
1515
"grunt-contrib-clean": "^0.6.0",
1616
"grunt-contrib-coffee": "^0.13.0",

demo/config/blockchain.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ development:
33
rpc_port: 8101
44
rpc_whitelist: "*"
55
minerthreads: 1
6+
genesis_block: config/genesis/dev_genesis.json
67
datadir: /tmp/embark
78
mine_when_needed: true
89
gas_limit: 500000
@@ -20,7 +21,7 @@ staging:
2021
console: true
2122
account:
2223
init: false
23-
address:
24+
address:
2425
production:
2526
rpc_host: localhost
2627
rpc_port: 8101
@@ -30,4 +31,4 @@ production:
3031
console: true
3132
account:
3233
init: false
33-
address:
34+
address:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"nonce": "0x0000000000000042",
3+
"difficulty": "0x40000",
4+
"alloc": {
5+
},
6+
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
7+
"coinbase": "0x0000000000000000000000000000000000000000",
8+
"timestamp": "0x00",
9+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
10+
"extraData": "0x",
11+
"gasLimit": "0x4c4b40"
12+
}

demo_meteor/config/blockchain.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ development:
33
rpc_port: 8101
44
rpc_whitelist: "*"
55
minerthreads: 1
6+
genesis_block: config/genesis.json
67
datadir: /tmp/embark
78
mine_when_needed: true
89
gas_limit: 500000
@@ -20,4 +21,4 @@ staging:
2021
console: true
2122
account:
2223
init: false
23-
address:
24+
address:

demo_meteor/config/genesis.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"nonce": "0x0000000000000042",
3+
"difficulty": "0x40000",
4+
"alloc": {
5+
},
6+
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
7+
"coinbase": "0x0000000000000000000000000000000000000000",
8+
"timestamp": "0x00",
9+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
10+
"extraData": "0x",
11+
"gasLimit": "0x4c4b40"
12+
}

lib/blockchain.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
var mkdirp = require('mkdirp');
12

23
Blockchain = function(blockchainConfig) {
34
this.config = blockchainConfig;
@@ -25,9 +26,12 @@ Blockchain.prototype.generate_basic_command = function() {
2526
}
2627

2728
cmd += "--mine ";
29+
if (config.genesisBlock !== void 0) {
30+
cmd += "--genesis=\"" + config.genesisBlock + "\" ";
31+
}
2832

2933
//TODO: this should be configurable
30-
cmd += "--maxpeers 0 ";
34+
cmd += "--maxpeers " + config.maxPeers + " ";
3135

3236
if (config.account.password !== void 0) {
3337
cmd += "--password " + config.account.password + " ";
@@ -73,6 +77,14 @@ Blockchain.prototype.get_address = function() {
7377
var address = null;
7478

7579
if (config.account.init) {
80+
// ensure datadir exists, bypassing the interactive liabilities prompt.
81+
var newDir = mkdirp.sync(config.datadir);
82+
if (newDir) {
83+
console.log("=== datadir created");
84+
} else {
85+
console.log("=== datadir already exists");
86+
}
87+
7688
console.log("running: " + this.list_command());
7789
result = exec(this.list_command());
7890

@@ -96,4 +108,3 @@ Blockchain.prototype.startChain = function(use_tmp) {
96108
}
97109

98110
module.exports = Blockchain
99-

0 commit comments

Comments
 (0)