diff --git a/lib/blocks.js b/lib/blocks.js index 30892e7..51417e5 100644 --- a/lib/blocks.js +++ b/lib/blocks.js @@ -49,7 +49,7 @@ BlockController.prototype.transformBlock = function(block, info) { time: blockObj.header.time, nonce: blockObj.header.nonce, bits: blockObj.header.bits.toString(16), - difficulty: 0, // placeholder + difficulty: block.header.getDifficulty(), chainwork: info.chainWork, previousblockhash: blockObj.header.prevHash, nextblockhash: null, // placeholder diff --git a/package.json b/package.json index 60bc920..33831b1 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "bitcoreNode": "lib", "dependencies": { "async": "*", - "bitcore": "^0.13.2", + "bitcore": "^0.13.3", "lodash": "^2.4.1" }, "devDependencies": { diff --git a/test/blocks.js b/test/blocks.js index 77520f8..655e555 100644 --- a/test/blocks.js +++ b/test/blocks.js @@ -67,9 +67,7 @@ describe('Blocks', function() { var bitcoreBlock = bitcore.Block.fromBuffer(new Buffer(blocks['0000000000000afa0c3c0afd450c793a1e300ec84cbe9555166e06132f19a8f7'], 'hex')); var todos = { - difficulty: 1295829.93087696, - nextblockhash: '000000000001e866a8057cde0c650796cb8a59e0e6038dc31c69d7ca6649627d', - reward: 12.5 + nextblockhash: '000000000001e866a8057cde0c650796cb8a59e0e6038dc31c69d7ca6649627d' }; var node = {