update readme, config defaults

This commit is contained in:
tenthirtyone 2017-08-10 00:00:02 -04:00
parent 83a9388e99
commit 8d70c017ed
4 changed files with 12 additions and 7 deletions

View File

@ -39,7 +39,7 @@ db.transactions.drop()
Ctrl+D out of mongo
rm -rf ~/.bcoin/chain.ldb
rm -rf ${bcoin-prefix-in-config}/chain.ldb
```
### Nginx

View File

@ -1,14 +1,15 @@
const config = {
full_node: true,
start_node: true,
logging: 'debug',
bcoin: {
network: 'main',
db: 'leveldb',
prefix: '.',
checkpoints: true,
workers: true,
logLevel: 'info',
'max-inbound': 100,
'max-outbound': 100,
'max-inbound': 10,
'max-outbound': 10,
},
mongodb: {
uri: 'mongodb://localhost/bitcore',
@ -19,6 +20,8 @@ const config = {
api: {
port: 3000,
json_spaces: 2,
currency_refresh: 60,
ticker_url: 'https://www.bitstamp.net/api/ticker/',
},
};

View File

@ -10,6 +10,7 @@ logger.log('debug',
db.connect(config.mongodb.uri, config.mongodb.options);
db.connection.once('open', () => {
if (config.start_node) Bcoin.start();
Api.listen(config.api.port, () => {

View File

@ -10,9 +10,10 @@ const node = new FullNode(config.bcoin);
function start() {
node.open()
.then(() => {
node.connect().then(() => {
node.startSync();
});
node.connect()
.then(() => {
node.startSync();
});
});
node.chain.on('connect', (entry, block) => {