diff --git a/lib/http/rpc.js b/lib/http/rpc.js index 5ec6efd1..ec1f9813 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -920,7 +920,7 @@ RPC.prototype._headerToJSON = co(function* _headerToJSON(entry) { RPC.prototype._blockToJSON = co(function* _blockToJSON(entry, block, txDetails) { var self = this; - var medianTime = yield entry.getMedianTime(); + var mtp = yield entry.getMedianTime(); var nextHash = yield this.chain.db.getNextHash(entry.hash); return { @@ -938,7 +938,7 @@ RPC.prototype._blockToJSON = co(function* _blockToJSON(entry, block, txDetails) return tx.txid(); }), time: entry.ts, - mediantime: medianTime, + mediantime: mtp, bits: entry.bits, difficulty: this._getDifficulty(entry), chainwork: entry.chainwork.toString('hex', 64), @@ -1151,22 +1151,21 @@ RPC.prototype._mempoolToJSON = function _mempoolToJSON(verbose) { }; RPC.prototype._entryToJSON = function _entryToJSON(entry) { - var tx = entry.tx; return { size: entry.size, fee: Amount.btc(entry.fee, true), - modifiedfee: Amount.btc(entry.fee, true), + modifiedfee: 0, time: entry.ts, height: entry.height, startingpriority: entry.priority, currentpriority: entry.getPriority(this.chain.height), descendantcount: this.mempool.countDescendants(entry), - descendantsize: entry.sizes, - descendantfees: Amount.btc(entry.fee, true), + descendantsize: entry.descSize, + descendantfees: Amount.btc(entry.descFee, true), ancestorcount: this.mempool.countAncestors(entry), - ancestorsize: entry.sizes, - ancestorfees: Amount.btc(entry.fee, true), - depends: this.mempool.getDepends(tx).map(util.revHex) + ancestorsize: 0, + ancestorfees: 0, + depends: this.mempool.getDepends(entry.tx).map(util.revHex) }; };