rpc: fix getrawmempool.
This commit is contained in:
parent
d26787b389
commit
6ee7ac8a51
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user