tinterface: in server.version, send "electrum/3.3.4" as client name - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 4f2aa53a7657fb90bcdd74b6e1fa48c545fcadd7 (DIR) parent 0c1ea909dfc0c7645d135b06cb101f7a12f51c3e (HTM) Author: SomberNight <somber.night@protonmail.com> Date: Fri, 12 Apr 2019 19:11:25 +0200 interface: in server.version, send "electrum/3.3.4" as client name closes #5246 Diffstat: M electrum/interface.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- (DIR) diff --git a/electrum/interface.py b/electrum/interface.py t@@ -403,7 +403,7 @@ class Interface(PrintError): self.session.interface = self self.session.default_timeout = self.network.get_network_timeout_seconds(NetworkTimeout.Generic) try: - ver = await session.send_request('server.version', [version.ELECTRUM_VERSION, version.PROTOCOL_VERSION]) + ver = await session.send_request('server.version', [self.client_name(), version.PROTOCOL_VERSION]) except aiorpcx.jsonrpc.RPCError as e: raise GracefulDisconnect(e) # probably 'unsupported protocol version' if exit_early: t@@ -600,6 +600,10 @@ class Interface(PrintError): self.print_error("exiting backward mode at", height) return height, header, bad, bad_header + @classmethod + def client_name(cls) -> str: + return f'electrum/{version.ELECTRUM_VERSION}' + def _assert_header_does_not_check_against_any_chain(header: dict) -> None: chain_bad = blockchain.check_header(header) if 'mock' not in header else header['mock']['check'](header)