update readme, config defaults
This commit is contained in:
parent
83a9388e99
commit
8d70c017ed
@ -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
|
||||
|
||||
@ -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/',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
1
index.js
1
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, () => {
|
||||
|
||||
@ -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) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user