From d84417e2d66c11bbed46de17522cc0f926b7a62a Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 12 Nov 2016 22:09:00 +0900 Subject: [PATCH 1/3] Add note about IRC package --- docs/HOWTO.rst | 4 ++++ server/irc.py | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/HOWTO.rst b/docs/HOWTO.rst index fc0997c..21f7379 100644 --- a/docs/HOWTO.rst +++ b/docs/HOWTO.rst @@ -11,6 +11,10 @@ small - patches welcome. + aiohttp: Python library for asynchronous HTTP. ElectrumX uses it for communication with the daemon. Version >= 1.0 required; I am using 1.0.5. ++ irc: Python IRC package. Only required if you enable IRC; ElectrumX + will happily serve clients that try to connect directly. + I use 15.0.4 but older versions likely are fine. + While not requirements for running ElectrumX, it is intended to be run with supervisor software such as Daniel Bernstein's daemontools, diff --git a/server/irc.py b/server/irc.py index 8a52f75..a98fea0 100644 --- a/server/irc.py +++ b/server/irc.py @@ -20,6 +20,7 @@ from lib.hash import double_sha256 from lib.util import LoggedClass from server.version import VERSION + def port_text(letter, port, default): if not port: return '' From 14d8ece7c6cc3c456a31f9fe0ea1450c5cc859cc Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 12 Nov 2016 23:20:20 +0900 Subject: [PATCH 2/3] Return a version the Electrum client expects If you don't do this you don't appear in the network dialog box --- server/irc.py | 5 +++-- server/protocol.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/irc.py b/server/irc.py index a98fea0..0f7ec98 100644 --- a/server/irc.py +++ b/server/irc.py @@ -18,7 +18,6 @@ from collections import namedtuple from lib.hash import double_sha256 from lib.util import LoggedClass -from server.version import VERSION def port_text(letter, port, default): @@ -41,7 +40,9 @@ class IRC(LoggedClass): super().__init__() tcp_text = port_text('t', env.report_tcp_port, 50001) ssl_text = port_text('s', env.report_ssl_port, 50002) - version = 'X{}'.format(VERSION.split()[1]) + # If this isn't something the client expects you won't appear + # in the client's network dialog box + version = '1.0' self.real_name = '{} v{} {} {}'.format(env.report_host, version, tcp_text, ssl_text) self.nick = 'E_{}'.format(env.irc_nick if env.irc_nick else diff --git a/server/protocol.py b/server/protocol.py index d5f2999..ab3899d 100644 --- a/server/protocol.py +++ b/server/protocol.py @@ -47,7 +47,10 @@ class BlockServer(BlockProcessor): if not self.servers: await self.start_servers() if self.env.irc: + self.logger.info('starting IRC coroutine') asyncio.ensure_future(self.irc.start()) + else: + self.logger.info('IRC disabled') ElectrumX.notify(self.height, self.touched) async def start_server(self, class_name, kind, host, port, *, ssl=None): From d816c2175249277d7565b53f0cba0110d3faa7ff Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 12 Nov 2016 23:23:08 +0900 Subject: [PATCH 3/3] Prepare 0.4.1 --- docs/RELEASE-NOTES | 6 ++++++ server/version.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/RELEASE-NOTES b/docs/RELEASE-NOTES index 551811f..3243c45 100644 --- a/docs/RELEASE-NOTES +++ b/docs/RELEASE-NOTES @@ -1,3 +1,9 @@ +version 0.4.1 +------------- + +- tweak IRC version reporting so we appear in the Electrum client's + network dialog box + version 0.4 ----------- diff --git a/server/version.py b/server/version.py index 9cd652a..2d25182 100644 --- a/server/version.py +++ b/server/version.py @@ -1 +1 @@ -VERSION = "ElectrumX 0.4" +VERSION = "ElectrumX 0.4.1"