block integration test fixed
This commit is contained in:
parent
8edf753883
commit
9f6e340364
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||||||
|
@ -19,10 +20,9 @@ describe('Address balances', function(){
|
||||||
|
|
||||||
addrValid.forEach(function(v) {
|
addrValid.forEach(function(v) {
|
||||||
if (v.disabled) {
|
if (v.disabled) {
|
||||||
console.log(v.addr + " => disabled in JSON");
|
console.log(v.addr + ' => disabled in JSON');
|
||||||
}
|
} else {
|
||||||
else {
|
it('Address info for: ' + v.addr, function(done) {
|
||||||
it('Info for: ' + v.addr, function(done) {
|
|
||||||
this.timeout(5000);
|
this.timeout(5000);
|
||||||
|
|
||||||
var a = new Address(v.addr, txDb);
|
var a = new Address(v.addr, txDb);
|
||||||
|
@ -50,4 +50,3 @@ describe('Address balances', function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||||||
|
@ -15,7 +16,6 @@ var bDb;
|
||||||
|
|
||||||
describe('BlockDb fromHashWithInfo', function() {
|
describe('BlockDb fromHashWithInfo', function() {
|
||||||
|
|
||||||
|
|
||||||
before(function(c) {
|
before(function(c) {
|
||||||
bDb = new BlockDb();
|
bDb = new BlockDb();
|
||||||
return c();
|
return c();
|
||||||
|
@ -24,9 +24,13 @@ describe('BlockDb fromHashWithInfo', function(){
|
||||||
it('should poll block\'s info from bitcoind', function(done) {
|
it('should poll block\'s info from bitcoind', function(done) {
|
||||||
bDb.fromHashWithInfo(TESTING_BLOCK, function(err, b2) {
|
bDb.fromHashWithInfo(TESTING_BLOCK, function(err, b2) {
|
||||||
if (err) done(err);
|
if (err) done(err);
|
||||||
assert.equal(b2.hash, TESTING_BLOCK);
|
assert.equal(b2.hash, TESTING_BLOCK, 'hash');
|
||||||
assert.equal(b2.info.hash, TESTING_BLOCK);
|
assert.equal(b2.info.hash, TESTING_BLOCK, 'info.hash');
|
||||||
assert.equal(b2.info.chainwork, '000000000000000000000000000000000000000000000000001b6dc969ffe847');
|
assert.equal(b2.info.height, 71619);
|
||||||
|
assert.equal(b2.info.nonce, 3960980741);
|
||||||
|
assert.equal(b2.info.bits, '1c018c14');
|
||||||
|
assert.equal(b2.info.merkleroot, '9a326cb524aa2e5bc926b8c1f6de5b01257929ee02158054b55aae93a55ec9dd');
|
||||||
|
assert.equal(b2.info.nextblockhash, '000000000121941b3b10d76fbe67b35993df91eb3398e9153e140b4f6213cb84');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -37,4 +41,3 @@ describe('BlockDb fromHashWithInfo', function(){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue