diff --git a/.travis.yml b/.travis.yml index fbc8be0eb..d17ddd014 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 \ No newline at end of file + - npm run coveralls diff --git a/README.md b/README.md index 48a71dd54..f3af67d5a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 mynode +litecore-node create -d mynode cd mynode litecore-node install litecore-node install https://github.com/yourname/helloworld @@ -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 @@ -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) diff --git a/lib/services/bitcoind.js b/lib/services/bitcoind.js index c53dc4c86..e827c5863 100644 --- a/lib/services/bitcoind.js +++ b/lib/services/bitcoind.js @@ -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, diff --git a/package.json b/package.json index 5df3e0bab..f7c3313b5 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,9 @@ "litecoin", "litecoind" ], + "peerDependencies": { + "litecore-lib": "^0.13.22" + }, "dependencies": { "async": "^1.3.0", "body-parser": "^1.13.3", @@ -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": { @@ -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" diff --git a/regtest/bitcoind.js b/regtest/bitcoind.js index bfa80e6d6..73a4ce1ff 100644 --- a/regtest/bitcoind.js +++ b/regtest/bitcoind.js @@ -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() }); }); diff --git a/regtest/cluster.js b/regtest/cluster.js index 461014591..8fe3dad59 100644 --- a/regtest/cluster.js +++ b/regtest/cluster.js @@ -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); }); diff --git a/regtest/node.js b/regtest/node.js index 9ea63ca94..85783d763 100644 --- a/regtest/node.js +++ b/regtest/node.js @@ -110,7 +110,8 @@ describe('Node Functionality', function() { if(err) { throw err; } - done(); + process.exit(); + done(); // ## deprecated ## (Mocha v5), using process.exit() }); }); @@ -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) { @@ -684,7 +685,7 @@ describe('Node Functionality', function() { }); describe('Orphaned Transactions', function() { - this.timeout(8000); + this.timeout(20000); var orphanedTransaction; before(function(done) { diff --git a/regtest/p2p.js b/regtest/p2p.js index bf8e53e35..291ccc796 100644 --- a/regtest/p2p.js +++ b/regtest/p2p.js @@ -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(); diff --git a/test/logger.unit.js b/test/logger.unit.js index 755228145..fcdb90a62 100644 --- a/test/logger.unit.js +++ b/test/logger.unit.js @@ -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'); @@ -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'); diff --git a/test/scaffold/create.integration.js b/test/scaffold/create.integration.js index 5d3a22ced..6b11328ff 100644 --- a/test/scaffold/create.integration.js +++ b/test/scaffold/create.integration.js @@ -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)); diff --git a/test/services/bitcoind.unit.js b/test/services/bitcoind.unit.js index 63b9375ad..c11543ac5 100644 --- a/test/services/bitcoind.unit.js +++ b/test/services/bitcoind.unit.js @@ -228,25 +228,25 @@ describe('Bitcoin Service', function() { it('will add a valid address', function() { var bitcoind = new BitcoinService(baseConfig); var emitter = new EventEmitter(); - bitcoind.subscribeAddress(emitter, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - should.exist(bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); + bitcoind.subscribeAddress(emitter, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + should.exist(bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); }); it('will handle multiple address subscribers', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscribeAddress(emitter1, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscribeAddress(emitter2, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - should.exist(bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(2); + bitcoind.subscribeAddress(emitter1, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscribeAddress(emitter2, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + should.exist(bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(2); }); it('will not add the same emitter twice', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); - bitcoind.subscribeAddress(emitter1, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscribeAddress(emitter1, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - should.exist(bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(1); + bitcoind.subscribeAddress(emitter1, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscribeAddress(emitter1, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + should.exist(bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(1); }); }); @@ -262,57 +262,57 @@ describe('Bitcoin Service', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscribeAddress(emitter1, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscribeAddress(emitter2, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - should.exist(bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(2); - bitcoind.unsubscribeAddress(emitter1, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(1); + bitcoind.subscribeAddress(emitter1, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscribeAddress(emitter2, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + should.exist(bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(2); + bitcoind.unsubscribeAddress(emitter1, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(1); }); it('will unsubscribe subscriptions for an emitter', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'] = [emitter1, emitter2]; + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'] = [emitter1, emitter2]; bitcoind.unsubscribeAddress(emitter1); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(1); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(1); }); it('will NOT unsubscribe subscription with missing address', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'] = [emitter1, emitter2]; + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'] = [emitter1, emitter2]; bitcoind.unsubscribeAddress(emitter1, ['LWx1jmpcMAQMXou6pbLyfMU7zETnbhy3bo']); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(2); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(2); }); it('will NOT unsubscribe subscription with missing emitter', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'] = [emitter2]; - bitcoind.unsubscribeAddress(emitter1, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(1); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'][0].should.equal(emitter2); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'] = [emitter2]; + bitcoind.unsubscribeAddress(emitter1, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(1); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'][0].should.equal(emitter2); }); it('will remove empty addresses', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'] = [emitter1, emitter2]; - bitcoind.unsubscribeAddress(emitter1, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - bitcoind.unsubscribeAddress(emitter2, ['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); - should.not.exist(bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br']); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'] = [emitter1, emitter2]; + bitcoind.unsubscribeAddress(emitter1, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + bitcoind.unsubscribeAddress(emitter2, ['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); + should.not.exist(bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3']); }); it('will unsubscribe emitter for all addresses', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'] = [emitter1, emitter2]; + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'] = [emitter1, emitter2]; bitcoind.subscriptions.address['LWx1jmpcMAQMXou6pbLyfMU7zETnbhy3bo'] = [emitter1, emitter2]; sinon.spy(bitcoind, 'unsubscribeAddressAll'); bitcoind.unsubscribeAddress(emitter1); bitcoind.unsubscribeAddressAll.callCount.should.equal(1); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(1); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(1); bitcoind.subscriptions.address['LWx1jmpcMAQMXou6pbLyfMU7zETnbhy3bo'].length.should.equal(1); }); }); @@ -329,15 +329,15 @@ describe('Bitcoin Service', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); var emitter2 = new EventEmitter(); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'] = [emitter1, emitter2]; + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'] = [emitter1, emitter2]; bitcoind.subscriptions.address['LWx1jmpcMAQMXou6pbLyfMU7zETnbhy3bo'] = [emitter1, emitter2]; bitcoind.subscriptions.address['mgY65WSfEmsyYaYPQaXhmXMeBhwp4EcsQW'] = [emitter2]; - bitcoind.subscriptions.address['3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou'] = [emitter1]; + bitcoind.subscriptions.address['MJZWZqmykQ32rvH8vUnW9jEPbyGg7agWQZ'] = [emitter1]; bitcoind.unsubscribeAddress(emitter1); - bitcoind.subscriptions.address['2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'].length.should.equal(1); + bitcoind.subscriptions.address['mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'].length.should.equal(1); bitcoind.subscriptions.address['LWx1jmpcMAQMXou6pbLyfMU7zETnbhy3bo'].length.should.equal(1); bitcoind.subscriptions.address['mgY65WSfEmsyYaYPQaXhmXMeBhwp4EcsQW'].length.should.equal(1); - should.not.exist(bitcoind.subscriptions.address['3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou']); + should.not.exist(bitcoind.subscriptions.address['MJZWZqmykQ32rvH8vUnW9jEPbyGg7agWQZ']); }); }); @@ -1091,7 +1091,7 @@ describe('Bitcoin Service', function() { var wif = 'T872No3VhULcqFF6Sv1PSCRXZKVBPYWG2UtG4ECFK7nzaUUU8Kuj'; var privkey = bitcore.PrivateKey.fromWIF(wif); var inputAddress = privkey.toAddress(bitcore.Networks.testnet); - var outputAddress = bitcore.Address('2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'); + var outputAddress = bitcore.Address('mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'); var tx = bitcore.Transaction(); tx.from({ txid: '4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b', @@ -1139,7 +1139,7 @@ describe('Bitcoin Service', function() { it('will return unique values', function() { var bitcoind = new BitcoinService(baseConfig); var tx = bitcore.Transaction(); - var address = bitcore.Address('2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'); + var address = bitcore.Address('mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'); tx.addOutput(bitcore.Transaction.Output({ script: bitcore.Script(address), satoshis: 5000000000 @@ -3318,32 +3318,32 @@ describe('Bitcoin Service', function() { it('will get address strings from bitcore addresses', function() { var addresses = [ bitcore.Address('LUVKqDPPVBQcjUwt1S21Pa5ybgPaDEZhXR'), - bitcore.Address('3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou'), + bitcore.Address('mgY65WSfEmsyYaYPQaXhmXMeBhwp4EcsQW'), ]; var bitcoind = new BitcoinService(baseConfig); var strings = bitcoind._getAddressStrings(addresses); strings[0].should.equal('LUVKqDPPVBQcjUwt1S21Pa5ybgPaDEZhXR'); - strings[1].should.equal('3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou'); + strings[1].should.equal('mgY65WSfEmsyYaYPQaXhmXMeBhwp4EcsQW'); }); it('will get address strings from strings', function() { var addresses = [ 'LUVKqDPPVBQcjUwt1S21Pa5ybgPaDEZhXR', - '3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou', + 'MJZWZqmykQ32rvH8vUnW9jEPbyGg7agWQZ', ]; var bitcoind = new BitcoinService(baseConfig); var strings = bitcoind._getAddressStrings(addresses); strings[0].should.equal('LUVKqDPPVBQcjUwt1S21Pa5ybgPaDEZhXR'); - strings[1].should.equal('3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou'); + strings[1].should.equal('MJZWZqmykQ32rvH8vUnW9jEPbyGg7agWQZ'); }); it('will get address strings from mixture of types', function() { var addresses = [ bitcore.Address('LUVKqDPPVBQcjUwt1S21Pa5ybgPaDEZhXR'), - '3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou', + 'MJZWZqmykQ32rvH8vUnW9jEPbyGg7agWQZ', ]; var bitcoind = new BitcoinService(baseConfig); var strings = bitcoind._getAddressStrings(addresses); strings[0].should.equal('LUVKqDPPVBQcjUwt1S21Pa5ybgPaDEZhXR'); - strings[1].should.equal('3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou'); + strings[1].should.equal('MJZWZqmykQ32rvH8vUnW9jEPbyGg7agWQZ'); }); it('will give error with unknown', function() { var addresses = [ @@ -4135,12 +4135,12 @@ describe('Bitcoin Service', function() { getBlockHash: getBlockHash } }); - bitcoind._maybeGetBlockHash('2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br', function(err, hash) { + bitcoind._maybeGetBlockHash('mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3', function(err, hash) { if (err) { return done(err); } getBlockHash.callCount.should.equal(0); - hash.should.equal('2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br'); + hash.should.equal('mu5a17UQDh2hsRk9ZJzFkTfCbzZhMVBHY3'); done(); }); }); @@ -5033,4 +5033,4 @@ describe('Bitcoin Service', function() { }); }); -}); +}); \ No newline at end of file