From 067814e7d94a68950b071090ff04720530721230 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 13 Dec 2016 21:38:02 +0900 Subject: [PATCH] Remove numpeers and numsessions RPC calls getinfo has that information and more. --- server/protocol.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/server/protocol.py b/server/protocol.py index cf55295..5a8bf87 100644 --- a/server/protocol.py +++ b/server/protocol.py @@ -523,15 +523,9 @@ class ServerManager(util.LoggedClass): async def rpc_sessions(self, params): return self.session_data(for_log=False) - async def rpc_numsessions(self, params): - return self.session_count() - async def rpc_peers(self, params): return self.irc.peers - async def rpc_numpeers(self, params): - return len(self.irc.peers) - class Session(JSONRPC): '''Base class of ElectrumX JSON session protocols. @@ -998,9 +992,7 @@ class LocalRPC(Session): def __init__(self, *args): super().__init__(*args) - cmds = ('disconnect getinfo groups log numpeers numsessions ' - 'peers sessions' - .split()) + cmds = 'disconnect getinfo groups log peers sessions'.split() self.handlers = {cmd: getattr(self.manager, 'rpc_{}'.format(cmd)) for cmd in cmds} self.client = 'RPC'