jsbeautify
This commit is contained in:
parent
ead58e1e52
commit
5576dacf69
|
@ -202,7 +202,6 @@ function spec() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Sync.prototype.close = function() {
|
Sync.prototype.close = function() {
|
||||||
console.log("closing connection");
|
console.log("closing connection");
|
||||||
this.db.close();
|
this.db.close();
|
||||||
|
|
2
p2p.js
2
p2p.js
|
@ -1,6 +1,5 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
@ -133,7 +132,6 @@ function handle_block(info) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_connected(data) {
|
function handle_connected(data) {
|
||||||
|
|
|
@ -14,32 +14,12 @@ var
|
||||||
|
|
||||||
mongoose.connection.on('error', function(err) { console.log(err); });
|
mongoose.connection.on('error', function(err) { console.log(err); });
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
describe('Block getInfo', function(){
|
|
||||||
=======
|
|
||||||
describe('Block fromHashWithInfo', function(){
|
describe('Block fromHashWithInfo', function(){
|
||||||
>>>>>>> fd86e6d074c5aa4642172b221b9e6f69f3fd8634
|
|
||||||
|
|
||||||
before(function(done) {
|
before(function(done) {
|
||||||
mongoose.connect(config.db);
|
mongoose.connect(config.db);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
after(function(done) {
|
|
||||||
mongoose.connection.close();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should poll block\'s info from mongoose', function(done) {
|
|
||||||
var block2 = Block.fromHashWithInfo(TESTING_BLOCK, function(err, b2) {
|
|
||||||
if (err) done(err);
|
|
||||||
|
|
||||||
assert.equal(b2.hash, TESTING_BLOCK);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
=======
|
|
||||||
|
|
||||||
after(function(done) {
|
after(function(done) {
|
||||||
mongoose.connection.close();
|
mongoose.connection.close();
|
||||||
|
@ -56,17 +36,11 @@ describe('Block fromHashWithInfo', function(){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
>>>>>>> fd86e6d074c5aa4642172b221b9e6f69f3fd8634
|
|
||||||
|
|
||||||
it('should poll block\'s info from bitcoind', function(done) {
|
it('should poll block\'s info from bitcoind', function(done) {
|
||||||
var block2 = Block.fromHashWithInfo(TESTING_BLOCK, function(err, b2) {
|
var block2 = Block.fromHashWithInfo(TESTING_BLOCK, function(err, b2) {
|
||||||
if (err) done(err);
|
if (err) done(err);
|
||||||
assert.equal(b2.info.hash, TESTING_BLOCK);
|
assert.equal(b2.info.hash, TESTING_BLOCK);
|
||||||
<<<<<<< HEAD
|
|
||||||
assert.equal(b2.info.chainwork, '00000000000000000000000000000000000000000000000000446af21d50acd3');
|
|
||||||
=======
|
|
||||||
assert.equal(b2.info.chainwork, '000000000000000000000000000000000000000000000000001b6dc969ffe847');
|
assert.equal(b2.info.chainwork, '000000000000000000000000000000000000000000000000001b6dc969ffe847');
|
||||||
>>>>>>> fd86e6d074c5aa4642172b221b9e6f69f3fd8634
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,6 @@ if (program.remove) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
function(cb) {
|
function(cb) {
|
||||||
sync.init(program);
|
sync.init(program);
|
||||||
|
|
Loading…
Reference in New Issue