rpc: getmemoryinfo.

This commit is contained in:
Christopher Jeffrey 2017-03-14 04:07:56 -07:00
parent f0630a830a
commit c174bed58d
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 7 additions and 6 deletions

View File

@ -147,7 +147,7 @@ RPC.prototype.init = function init() {
this.add('gettxoutproof', this.getTXOutProof); this.add('gettxoutproof', this.getTXOutProof);
this.add('verifytxoutproof', this.verifyTXOutProof); this.add('verifytxoutproof', this.verifyTXOutProof);
this.add('getmemory', this.getMemory); this.add('getmemoryinfo', this.getMemoryInfo);
this.add('setloglevel', this.setLogLevel); this.add('setloglevel', this.setLogLevel);
}; };
@ -2012,6 +2012,7 @@ RPC.prototype.estimateSmartPriority = co(function* estimateSmartPriority(args, h
RPC.prototype.invalidateBlock = co(function* invalidateBlock(args, help) { RPC.prototype.invalidateBlock = co(function* invalidateBlock(args, help) {
var valid = new Validator([args]); var valid = new Validator([args]);
var hash = valid.hash(0); var hash = valid.hash(0);
var entry;
if (help || args.length !== 1) if (help || args.length !== 1)
throw new RPCError('invalidateblock "hash"'); throw new RPCError('invalidateblock "hash"');
@ -2059,9 +2060,9 @@ RPC.prototype.setMockTime = co(function* setMockTime(args, help) {
return null; return null;
}); });
RPC.prototype.getMemory = co(function* getMemory(args, help) { RPC.prototype.getMemoryInfo = co(function* getMemoryInfo(args, help) {
if (help || args.length !== 0) if (help || args.length !== 0)
throw new RPCError('getmemory'); throw new RPCError('getmemoryinfo');
return util.memoryUsage(); return util.memoryUsage();
}); });

View File

@ -106,7 +106,7 @@ RPC.prototype.init = function init() {
this.add('walletpassphrase', this.walletPassphrase); this.add('walletpassphrase', this.walletPassphrase);
this.add('removeprunedfunds', this.removePrunedFunds); this.add('removeprunedfunds', this.removePrunedFunds);
this.add('selectwallet', this.selectWallet); this.add('selectwallet', this.selectWallet);
this.add('getmemory', this.getMemory); this.add('getmemoryinfo', this.getMemoryInfo);
this.add('setloglevel', this.setLogLevel); this.add('setloglevel', this.setLogLevel);
}; };
@ -1617,9 +1617,9 @@ RPC.prototype.selectWallet = co(function* selectWallet(args, help) {
return null; return null;
}); });
RPC.prototype.getMemory = co(function* getMemory(args, help) { RPC.prototype.getMemoryInfo = co(function* getMemoryInfo(args, help) {
if (help || args.length !== 0) if (help || args.length !== 0)
throw new RPCError('getmemory'); throw new RPCError('getmemoryinfo');
return util.memoryUsage(); return util.memoryUsage();
}); });