From e5ab8090266ed6b317bf044c8921fc9b7b440cb6 Mon Sep 17 00:00:00 2001 From: tenthirtyone Date: Fri, 4 Aug 2017 12:35:59 -0400 Subject: [PATCH] House cleaning, var names, package.json updates, config modifications --- README.md | 5 +---- config/index.js | 2 -- index.js | 4 ++-- lib/node/index.js | 2 ++ package.json | 7 +++++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b7a480a..84c376b 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,7 @@ The API is configured to run on port 3000 by default. Use the standard Nginx rev * sockets -2. Mongo Models - -Some data is stubbed. This is due to Bcoin primitives being different from Bitcore. It's unclear whether Mongo models or multiple queries at the api layer will better serve us. Obviously multiple queries are easier but I would prefer a clear cut data model because that leads to fewer problems in the future and gives us greater flexibility in our API and the other microservices we implement in the future. - # ToDo +Mongo Models : Bcoin primitives. A Bcoin block does not present all of bitcore's data. Reorg testing - Bcoin will handle this but we need to account for this in our mongo indexes. JSDoc & Unit tests diff --git a/config/index.js b/config/index.js index 2db41d2..8980e3e 100644 --- a/config/index.js +++ b/config/index.js @@ -12,8 +12,6 @@ const config = { uri: 'mongodb://localhost/bitcore', options: { useMongoClient: true, - socketTimeoutMS: 0, - connectTimeoutMS: 0 }, }, api: { diff --git a/index.js b/index.js index 3e5c83c..f5990c6 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -const node = require('./lib/node'); +const Bcoin = require('./lib/node'); const config = require('./config'); const logger = require('./lib/logger'); const Api = require('./lib/api'); @@ -15,5 +15,5 @@ Api.listen(config.api.port, () => { }); db.connection.once('open', function() { - node.start(); + Bcoin.start(); }); diff --git a/lib/node/index.js b/lib/node/index.js index 0133928..8bbd0fe 100644 --- a/lib/node/index.js +++ b/lib/node/index.js @@ -18,6 +18,8 @@ function start() { 'New Block & Ledger Entry'); BlockParser.parse(entry, block); }); + + // node.mempool.on('tx' ...) } module.exports = { diff --git a/package.json b/package.json index 516f256..6c8c287 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,17 @@ { "name": "bitcore-bcoin-insight", "version": "1.0.0", - "description": "", + "description": "Full node with extended capabilities using Bitcore and Bcoin", + "engines": { + "node": ">=7.6.0" + }, "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node index.js" }, "author": "", - "license": "", + "license": "MIT", "dependencies": { "bcoin": "^1.0.0-beta.14", "express": "^4.15.3",