test: bitcoind chainwork test

modified comparison to show how the values differ
This commit is contained in:
Braydon Fuller 2016-05-10 18:33:37 -04:00
parent 26c87ea32a
commit f6bbe54293
1 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ describe('Bitcoind Functionality', function() {
should.exist(blockIndex);
should.exist(blockIndex.chainwork);
var work = new BN(blockIndex.chainwork, 'hex');
work.cmp(expectedWork).should.equal(0);
work.toString(16).should.equal(expectedWork.toString(16));
expectedWork = expectedWork.add(new BN(2));
should.exist(blockIndex.previousblockhash);
blockIndex.hash.should.equal(blockHashes[i]);
@ -306,7 +306,7 @@ describe('Bitcoind Functionality', function() {
should.exist(header);
should.exist(header.chainwork);
var work = new BN(header.chainwork, 'hex');
work.cmp(expectedWork).should.equal(0);
work.toString(16).should.equal(expectedWork.toString(16));
expectedWork = expectedWork.add(new BN(2));
should.exist(header.previousblockhash);
header.hash.should.equal(blockHashes[i - 1]);