diff --git a/lib/bcoin/http/rpc.js b/lib/bcoin/http/rpc.js index 55af3ace..fdcd5f0e 100644 --- a/lib/bcoin/http/rpc.js +++ b/lib/bcoin/http/rpc.js @@ -412,7 +412,7 @@ RPC.prototype.getconnectioncount = function getconnectioncount(args, callback) { }; RPC.prototype.getnettotals = function getnettotals(args, callback) { - if (args.help || args.length < 1 || args.length > 2) + if (args.help || args.length > 0) return callback(new Error('getnettotals')); callback(null, { @@ -1137,7 +1137,7 @@ RPC.prototype.getmininginfo = function getmininginfo(args, callback) { if (args.help || args.length !== 0) return callback(new Error('getmininginfo')); - this.chain.getBlock(this.chain.tip.hash, function(err, block) { + this.chain.db.getBlock(this.chain.tip.hash, function(err, block) { if (err) return callback(err);