Fixed a few routes.
This commit is contained in:
parent
3c4aff4027
commit
2726c7eb86
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user