ci(Travis): Fix build, fix (or ignore) jshint issues

This commit is contained in:
Jason Dreyzehner 2017-07-31 14:40:35 -04:00
parent b8e8926dad
commit 7c65ebad27
8 changed files with 48 additions and 68 deletions

View File

@ -22,10 +22,10 @@
"trailing": true,
"undef": true,
"unused": true,
"maxparams": 4,
"maxstatements": 15,
"maxparams": 6,
"maxstatements": 25,
"maxcomplexity": 10,
"maxdepth": 3,
"maxdepth": 4,
"maxlen": 120,
"multistr": true,
"predef": [
@ -39,4 +39,4 @@
"module",
"require"
]
}
}

View File

@ -1,22 +1,10 @@
dist: trusty
sudo: false
language: node_js
env:
- CXX=g++-4.8 CC=gcc-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- gcc-4.8
- libzmq3-dev
node_js:
- "v0.10.25"
- "v0.12.7"
- "v4"
- 8
script:
- npm run regtest
- npm run test
- npm run coverage
- npm run jshint
after_success:
- npm run coveralls
- npm run coveralls

View File

@ -1,4 +1,5 @@
'use strict';
/* exported LRU, assert, constants */
var util = require('util');
var EventEmitter = require('events').EventEmitter;

View File

@ -255,8 +255,8 @@ AddressService.prototype._getAddressHistory = function(address, options, callbac
var self = this;
options = options || {};
var from = options.from || 0;
var to = options.to || 0xffffffff;
// var from = options.from || 0;
// var to = options.to || 0xffffffff;
if (_.isUndefined(options.queryMempool)) {
options.queryMempool = true;
@ -473,7 +473,11 @@ AddressService.prototype._processOutput = function(tx, output, index, opts) {
var txid = tx.txid();
var addressKey = this._encoding.encodeAddressIndexKey(address, opts.block.height, txid);
var utxoKey = this._encoding.encodeUtxoIndexKey(address, txid, index);
var utxoValue = this._encoding.encodeUtxoIndexValue(opts.block.height, Unit.fromBTC(output.value).toSatoshis(), output.script.toRaw());
var utxoValue = this._encoding.encodeUtxoIndexValue(
opts.block.height,
Unit.fromBTC(output.value).toSatoshis(),
output.script.toRaw()
);
var operations = [{
type: 'put',

View File

@ -1,9 +1,10 @@
'use strict';
var BaseService = require('../../service');
var util = require('util');
var utils = require('../../utils');
var Encoding = require('./encoding');
var index = require('../../index');
var log = index.log;
// var index = require('../../index');
// var log = index.log;
var MempoolService = function(options) {
BaseService.call(this, options);

View File

@ -26,15 +26,15 @@ pool.on('peerinv', function(peer, message) {
peer.sendMessage(messages.GetData(invList));
});
pool.on('peertx', function(peer, message) {
var tx = new bitcore.Transaction(message.transaction);
if (self.validTx(tx)) {
return self._cache.set(tx.id, tx);
}
return self._operations.push({
type: 'put',
key: new Buffer(tx.id),
value: tx.toBuffer()
});
});
// pool.on('peertx', function(peer, message) {
// var tx = new bitcore.Transaction(message.transaction);
// if (self.validTx(tx)) {
// return self._cache.set(tx.id, tx);
// }
// return self._operations.push({
// type: 'put',
// key: new Buffer(tx.id),
// value: tx.toBuffer()
// });
// });

39
package-lock.json generated
View File

@ -407,6 +407,11 @@
"bloom-filter": "0.2.0",
"buffers": "github:bitpay/node-buffers#04f4c4264e0d105db2b99b786843ed64f23230d8",
"socks5-client": "0.3.6"
},
"dependencies": {
"buffers": {
"version": "github:bitpay/node-buffers#04f4c4264e0d105db2b99b786843ed64f23230d8"
}
}
},
"bl": {
@ -516,9 +521,6 @@
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
"optional": true
},
"buffers": {
"version": "github:bitpay/node-buffers#04f4c4264e0d105db2b99b786843ed64f23230d8"
},
"bufferutil": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-1.2.1.tgz",
@ -1696,11 +1698,6 @@
"sntp": "1.0.9"
}
},
"heapdump": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/heapdump/-/heapdump-0.3.9.tgz",
"integrity": "sha1-A8dOsN9dZ74Jgug0KbqcnSs7f3g="
},
"hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
@ -2194,11 +2191,6 @@
"integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=",
"dev": true
},
"level-codec": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/level-codec/-/level-codec-6.1.0.tgz",
"integrity": "sha1-9d8KmVgvdtrEOFUVGrb05NDWAEU="
},
"level-errors": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.4.tgz",
@ -2254,28 +2246,33 @@
}
},
"levelup": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.8.tgz",
"integrity": "sha1-+0QsSI776hBD9+uZKaeSp0+9HaY=",
"version": "1.3.9",
"resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz",
"integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==",
"requires": {
"deferred-leveldown": "1.2.1",
"level-codec": "6.1.0",
"level-codec": "7.0.0",
"level-errors": "1.0.4",
"level-iterator-stream": "1.3.1",
"prr": "1.0.1",
"semver": "5.1.1",
"semver": "5.4.1",
"xtend": "4.0.1"
},
"dependencies": {
"level-codec": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.0.tgz",
"integrity": "sha1-x1W2jQ1E/6Cxy6BEuPgaVaFK05s="
},
"prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY="
},
"semver": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.1.1.tgz",
"integrity": "sha1-oykqNz5vPgeY2gsgZBuanFvEfhk="
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
}
}
},

View File

@ -34,7 +34,6 @@
},
"scripts": {
"test": "mocha -R spec --recursive",
"regtest": "./scripts/regtest",
"jshint": "jshint --reporter=node_modules/jshint-stylish ./lib",
"coverage": "istanbul cover _mocha -- --recursive",
"coveralls": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --recursive -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
@ -63,23 +62,13 @@
"liftoff": "^2.2.0",
"lodash": "^4.17.4",
"lru-cache": "^4.0.2",
"memdown": "^1.0.0",
"mkdirp": "0.5.0",
"multer": "^1.2.1",
"path-is-absolute": "^1.0.0",
"semver": "^5.0.1",
"socket.io": "^1.4.5",
"socket.io-client": "^1.4.5",
"ttyread": "^1.0.2",
"bitcore-p2p": "bitpay/bitcore-p2p#bcoin"
},
"optionalDependencies": {
"bufferutil": "~1.2.1",
"utf-8-validate": "~1.2.1"
},
"devDependencies": {
"zmq": "^2.14.0",
"benchmark": "1.0.0",
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"istanbul": "^0.4.3",