From f6bbe542932903102774dd28d2881f7b2c1a983c Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 10 May 2016 18:33:37 -0400 Subject: [PATCH] test: bitcoind chainwork test modified comparison to show how the values differ --- regtest/bitcoind.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regtest/bitcoind.js b/regtest/bitcoind.js index fecdd1fc..b8cf9bc5 100644 --- a/regtest/bitcoind.js +++ b/regtest/bitcoind.js @@ -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]);