From 0ac36aeca0d46976327c2938058cc11850dc1d48 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 24 Jan 2017 07:55:52 +0900 Subject: [PATCH 1/2] Make a copy of sessions to loop over --- server/controller.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/controller.py b/server/controller.py index 0372862..803d557 100644 --- a/server/controller.py +++ b/server/controller.py @@ -329,9 +329,10 @@ class Controller(util.LoggedClass): self.cache_height = self.bp.db_height self.header_cache.clear() - for session in self.sessions: - if isinstance(session, ElectrumX): - await session.notify(self.bp.db_height, touched) + # Make a copy; self.sessions can change whilst await-ing + sessions = [s for s in self.sessions if isinstance(s, ElectrumX)] + for session in sessions: + await session.notify(self.bp.db_height, touched) def electrum_header(self, height): '''Return the binary header at the given height.''' From 9b5cb105d5cc188cfd69de4cfcc154a7d318f45f Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 24 Jan 2017 07:57:29 +0900 Subject: [PATCH 2/2] Prepare 0.10.12 --- README.rst | 5 +++++ server/version.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ad2b58a..c39fdf0 100644 --- a/README.rst +++ b/README.rst @@ -135,6 +135,11 @@ version prior to the release of 1.0. ChangeLog ========= +Version 0.10.12 +--------------- + +* fixed a bug in 0.10.11 where a dict changed whilst iterating it + Version 0.10.11 --------------- diff --git a/server/version.py b/server/version.py index 0dc2bb7..ff7b40c 100644 --- a/server/version.py +++ b/server/version.py @@ -1 +1 @@ -VERSION = "ElectrumX 0.10.11" +VERSION = "ElectrumX 0.10.12"