-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RPC handlers were accidentally dropped during the session refactoring. Fixes #223
- Loading branch information
1 parent
1eccf9a
commit a390011
Showing
4 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from electrumx.server.session.session_base import SessionBase | ||
|
||
|
||
class LocalRPC(SessionBase): | ||
"""A local TCP RPC server session.""" | ||
|
||
processing_timeout = 10**9 # disable timeouts | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.client = "RPC" | ||
self.connection.max_response_size = 0 | ||
self.request_handlers = { | ||
"getinfo": self.session_mgr.rpc_getinfo, | ||
"groups": self.session_mgr.rpc_groups, | ||
"peers": self.session_mgr.rpc_peers, | ||
"sessions": self.session_mgr.rpc_sessions, | ||
"stop": self.session_mgr.rpc_stop, | ||
"disconnect": self.session_mgr.rpc_disconnect, | ||
"add_peer": self.session_mgr.rpc_add_peer, | ||
"daemon_url": self.session_mgr.rpc_daemon_url, | ||
"query": self.session_mgr.rpc_query, | ||
"reorg": self.session_mgr.rpc_reorg, | ||
"debug_memusage_list_all_objects": self.session_mgr.rpc_debug_memusage_list_all_objects, | ||
"debug_memusage_get_random_backref_chain": self.session_mgr.rpc_debug_memusage_get_random_backref_chain, | ||
} | ||
|
||
def protocol_version_string(self): | ||
return "RPC" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters