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,
|
height: header.height,
|
||||||
chainWork: header.chainwork,
|
chainWork: header.chainwork,
|
||||||
prevHash: header.prevHash,
|
prevHash: header.prevHash,
|
||||||
nextHash: null,
|
nextHash: header.nextHash,
|
||||||
merkleRoot: header.merkleRoot,
|
merkleRoot: header.merkleRoot,
|
||||||
time: block.ts,
|
time: block.ts,
|
||||||
medianTime: null,
|
medianTime: null,
|
||||||
|
|||||||
@ -50,15 +50,15 @@ TransactionService.prototype.getDetailedTransaction = function(txid, options, ca
|
|||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
self._header.getBlockHeader(tx.__height, function(err, hash) {
|
self._header.getBlockHeader(tx.__height, function(err, header) {
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(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);
|
callback(null, tx);
|
||||||
|
|
||||||
@ -168,9 +168,18 @@ TransactionService.prototype._getMempoolTransaction = function(txid, tx, options
|
|||||||
return callback(null, tx, options);
|
return callback(null, tx, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
tx.confirmations = 0;
|
self._getInputValues(tx, options, function(err, inputValues) {
|
||||||
tx.blockHash = null;
|
|
||||||
callback(null, tx, options);
|
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