rpc: fix getrawmempool.

This commit is contained in:
Christopher Jeffrey 2016-08-09 12:18:59 -07:00
parent d26787b389
commit 6ee7ac8a51
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -970,7 +970,7 @@ RPC.prototype.mempoolToJSON = function mempoolToJSON(verbose, callback) {
if (err)
return callback(err);
tx = entry;
tx = entry.tx;
out[tx.rhash] = {
size: entry.size,
@ -980,10 +980,10 @@ RPC.prototype.mempoolToJSON = function mempoolToJSON(verbose, callback) {
height: entry.height,
startingpriority: entry.priority,
currentpriority: entry.getPriority(self.chain.height),
descendantcount: -1,
descendantsize: -1,
descendantfees: -1,
depends: tx.getPrevout()
descendantcount: 0,
descendantsize: entry.size,
descendantfees: entry.fees,
depends: tx.getPrevout().map(utils.revHex)
};
next();
@ -1319,6 +1319,9 @@ RPC.prototype.generatetoaddress = function generatetoaddress(args, callback) {
address = this.miner.address;
this.miner.address = bcoin.address.fromBase58(args[1]);
args = args.slice();
args.splice(1, 1);
this.generate(args, function(err, hashes) {
if (err)
return callback(err);