From 8d70c017ed13f3ab59a94119fcc1847cf68829a9 Mon Sep 17 00:00:00 2001 From: tenthirtyone Date: Thu, 10 Aug 2017 00:00:02 -0400 Subject: [PATCH] update readme, config defaults --- README.md | 2 +- config/config-template.js | 9 ++++++--- index.js | 1 + lib/node/index.js | 7 ++++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 354b71b..48b47df 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/config/config-template.js b/config/config-template.js index b31b15d..d3bc4dc 100644 --- a/config/config-template.js +++ b/config/config-template.js @@ -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/', }, }; diff --git a/index.js b/index.js index b887476..eb4c8af 100644 --- a/index.js +++ b/index.js @@ -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, () => { diff --git a/lib/node/index.js b/lib/node/index.js index 4599107..7e4b8d2 100644 --- a/lib/node/index.js +++ b/lib/node/index.js @@ -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) => {