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