diff --git a/lib/services/block/index.js b/lib/services/block/index.js index a8355d77..f2579326 100644 --- a/lib/services/block/index.js +++ b/lib/services/block/index.js @@ -128,7 +128,7 @@ BlockService.prototype.getBlockOverview = function(hash, callback) { height: header.height, chainWork: header.chainwork, prevHash: header.prevHash, - nextHash: null, + nextHash: header.nextHash, merkleRoot: header.merkleRoot, time: block.ts, medianTime: null, diff --git a/lib/services/transaction/index.js b/lib/services/transaction/index.js index e1efbbac..5e64fb8c 100644 --- a/lib/services/transaction/index.js +++ b/lib/services/transaction/index.js @@ -50,15 +50,15 @@ TransactionService.prototype.getDetailedTransaction = function(txid, options, ca return callback(); } - self._header.getBlockHeader(tx.__height, function(err, hash) { + self._header.getBlockHeader(tx.__height, function(err, header) { if (err) { return callback(err); } - assert(hash, 'Tx must have a hash entry in header db for given height.'); + assert(header, 'Tx must have a header entry in header db for given height.'); - tx.__blockhash = hash; + tx.__blockhash = header.hash; callback(null, tx); @@ -168,9 +168,18 @@ TransactionService.prototype._getMempoolTransaction = function(txid, tx, options return callback(null, tx, options); } - tx.confirmations = 0; - tx.blockHash = null; - callback(null, tx, options); + self._getInputValues(tx, options, function(err, inputValues) { + + if (err) { + return callback(err); + } + + tx.__inputValues = inputValues; + tx.confirmations = 0; + tx.blockHash = null; + callback(null, tx, options); + + }); });