Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Merge f0d6b73 into be0cd40
Browse files Browse the repository at this point in the history
  • Loading branch information
backcopy committed Aug 23, 2018
2 parents be0cd40 + f0d6b73 commit dfbadbc
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 81 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ addons:
- gcc-4.8
- libzmq3-dev
node_js:
- "v0.10.25"
- "v0.12.7"
- "v4"
- "v8.11.4"
script:
- npm run regtest
- npm run test
- npm run jshint
after_success:
- npm run coveralls
- npm run coveralls
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ A Litecoin full node for building applications and services with Node.js. A node
## Install

```bash
npm install -g litecore-node
npm install -g litecore-node --unsafe-perm=true
litecore-node start
```

Note: For your convenience, we distribute bitcoind binaries for x86_64 Linux and x86_64 Mac OS X. Upon npm install, the binaries for your platform will be downloaded. For more detailed installation instructions, or if you want to compile the project yourself, then please see the Bitcore branch of [Litecoin Core with additional indexing](https://github.com/litecoin-project/litecore-litecoin).
Note: For your convenience, we distribute litecoind binaries for x86_64 Linux and x86_64 Mac OS X. Upon npm install, the binaries for your platform will be downloaded. For more detailed installation instructions, or if you want to compile the project yourself, then please see the Litecore branch of [Litecoin Core with additional indexing](https://github.com/litecoin-project/litecore-litecoin).

## Prerequisites

- GNU/Linux x86_32/x86_64, or OSX 64bit *(for bitcoind distributed binaries)*
- Node.js v0.10, v0.12 or v4
- GNU/Linux x86_32/x86_64, or OSX 64bit *(for litecoind distributed binaries)*
- Node.js v8.11.4 (LTS)
- ZeroMQ *(libzmq3-dev for Ubuntu/Debian or zeromq on OSX)*
- ~200GB of disk storage
- ~8GB of RAM
Expand All @@ -29,7 +29,7 @@ Note: For your convenience, we distribute bitcoind binaries for x86_64 Linux and
Litecore includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Litecore Node.

```bash
litecore-node create -d <bitcoin-data-dir> mynode
litecore-node create -d <litecoin-data-dir> mynode
cd mynode
litecore-node install <service>
litecore-node install https://github.com/yourname/helloworld
Expand All @@ -39,17 +39,17 @@ This will create a directory with configuration files for your node and install

## Add-on Services

There are several add-on services available to extend the functionality of Bitcore:
There are several add-on services available to extend the functionality of Litecore:

- [Insight API](https://github.com/bitpay/insight-api)
- [Insight UI](https://github.com/bitpay/insight-ui)
- [Bitcore Wallet Service](https://github.com/bitpay/bitcore-wallet-service)
- [Insight Lite API](https://github.com/litecoin-project/insight-lite-api)
- [Insight Lite UI](https://github.com/litecoin-project/insight-lite-ui)
- [Litecore Wallet Service](https://github.com/litecoin-project/litecore-wallet-service)

## Documentation

- [Upgrade Notes](docs/upgrade.md)
- [Services](docs/services.md)
- [Bitcoind](docs/services/bitcoind.md) - Interface to Bitcoin Core
- [Bitcoind](docs/services/bitcoind.md) - Interface to Litecoin Core
- [Web](docs/services/web.md) - Creates an express application over which services can expose their web/API content
- [Development Environment](docs/development.md) - Guide for setting up a development environment
- [Node](docs/node.md) - Details on the node constructor
Expand All @@ -64,7 +64,7 @@ Please send pull requests for bug fixes, code optimization, and ideas for improv

Code released under [the MIT license](https://github.com/litecoin-project/litecore-node/blob/master/LICENSE).

Copyright 2016 The Litecoin Core Developers
Copyright 2018 The Litecoin Core Developers

- bitcore: Copyright (c) 2013-2015 BitPay, Inc. (MIT License)
- bitcoin: Copyright (c) 2009-2015 Bitcoin Core Developers (MIT License)
2 changes: 1 addition & 1 deletion lib/services/bitcoind.js
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ Bitcoin.prototype.getDetailedTransaction = function(txid, callback) {

// returns vsize for segwit-positive coins,
// regular size if segwit is disbled
var size = result.vsize == null ? result.size : result.vsize;
var size = result.vsize === null ? result.size : result.vsize;
var tx = {
hex: result.hex,
blockHash: result.blockhash,
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"litecoin",
"litecoind"
],
"peerDependencies": {
"litecore-lib": "^0.13.22"
},
"dependencies": {
"async": "^1.3.0",
"body-parser": "^1.13.3",
Expand All @@ -60,13 +63,12 @@
"express": "^4.13.3",
"liftoff": "^2.2.0",
"litecoind-rpc": "^0.7.1",
"litecore-lib": "^0.13.22",
"lru-cache": "^4.0.1",
"mkdirp": "0.5.0",
"path-is-absolute": "^1.0.0",
"semver": "^5.0.1",
"socket.io": "^1.4.5",
"socket.io-client": "^1.4.5",
"socket.io": "^2.1.1",
"socket.io-client": "^2.1.1",
"zeromq": "^4.2.0"
},
"optionalDependencies": {
Expand All @@ -77,11 +79,11 @@
"benchmark": "1.0.0",
"litecore-p2p": "^1.1.2",
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"coveralls": "^3.0.2",
"istanbul": "^0.4.3",
"jshint": "^2.9.2",
"jshint-stylish": "^2.1.0",
"mocha": "^2.4.5",
"mocha": "^5.2.0",
"proxyquire": "^1.3.1",
"rimraf": "^2.4.2",
"sinon": "^1.15.4"
Expand Down
3 changes: 2 additions & 1 deletion regtest/bitcoind.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ describe('Bitcoind Functionality', function() {
this.timeout(60000);
bitcoind.node.stopping = true;
bitcoind.stop(function(err, result) {
done();
process.exit();
done(); // ## deprecated ## (Mocha v5), using process.exit()
});
});

Expand Down
2 changes: 1 addition & 1 deletion regtest/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('Bitcoin Cluster', function() {
async.each(daemons, function(process, next) {
process.once('exit', next);
process.kill('SIGINT');
}, done);
}, process.exit());
}, 1000);
});

Expand Down
7 changes: 4 additions & 3 deletions regtest/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ describe('Node Functionality', function() {
if(err) {
throw err;
}
done();
process.exit();
done(); // ## deprecated ## (Mocha v5), using process.exit()
});
});

Expand Down Expand Up @@ -147,7 +148,7 @@ describe('Node Functionality', function() {
var address;
var unspentOutput;
before(function(done) {
this.timeout(10000);
this.timeout(20000);
address = testKey.toAddress(regtest).toString();
var startHeight = node.services.bitcoind.height;
node.services.bitcoind.on('tip', function(height) {
Expand Down Expand Up @@ -684,7 +685,7 @@ describe('Node Functionality', function() {
});

describe('Orphaned Transactions', function() {
this.timeout(8000);
this.timeout(20000);
var orphanedTransaction;

before(function(done) {
Expand Down
4 changes: 3 additions & 1 deletion regtest/p2p.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ describe('P2P Functionality', function() {
log.info('Peer disconnected');
bitcoind.node.stopping = true;
bitcoind.stop(function(err, result) {
done();
if (err){ new Error(`Unable to shut down Daemon: ${err}`) };
process.exit();
done(); // ## deprecated ## (Mocha v5), using process.exit()
});
});
peer.disconnect();
Expand Down
14 changes: 7 additions & 7 deletions test/logger.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ describe('Logger', function() {
console.error.callCount.should.equal(1);
console.error.restore();

sandbox.stub(console, 'log');
sandbox.stub(console, 'debug');
logger.debug('Test debug log');
console.log.callCount.should.equal(1);
console.log.restore();
console.debug.callCount.should.equal(1);
console.debug.restore();

sandbox.stub(console, 'warn');
logger.warn('Test warn log');
Expand All @@ -67,11 +67,11 @@ describe('Logger', function() {
console.error.args[0][0].should.be.instanceof(Error);
console.error.restore();

sandbox.stub(console, 'log');
sandbox.stub(console, 'debug');
logger.debug('Test debug log');
console.log.callCount.should.equal(1);
should.equal(console.log.args[0][0].match(/^\[/), null);
console.log.restore();
console.debug.callCount.should.equal(1);
should.equal(console.debug.args[0][0].match(/^\[/), null);
console.debug.restore();

sandbox.stub(console, 'warn');
logger.warn('Test warn log');
Expand Down
4 changes: 2 additions & 2 deletions test/scaffold/create.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ describe('#create', function() {
should.equal(fs.existsSync(packagePath), true);

var config = JSON.parse(fs.readFileSync(configPath));
config.services.should.deep.equal(['bitcoind', 'db', 'address', 'web']);
config.datadir.should.equal('./data');
config.services.should.deep.equal(['bitcoind', 'web']);
config.servicesConfig.bitcoind.spawn.datadir.should.equal('./data');
config.network.should.equal('livenet');

var pack = JSON.parse(fs.readFileSync(packagePath));
Expand Down
Loading

0 comments on commit dfbadbc

Please sign in to comment.