tSubscribed address fix - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 3746050fe6bfd053984def39355f3062ca86538f DIR parent cbf9052daee6789e788c5aad22f000e93d767ca3 HTML Author: Neil Booth <kyuupichan@gmail.com> Date: Thu, 10 Sep 2015 13:32:00 +0900 Subscribed address fix Add an addr to the subcribed address set on receiving a response, not on sending a request. Diffstat: M lib/network.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- DIR diff --git a/lib/network.py b/lib/network.py t@@ -509,6 +509,10 @@ class Network(util.DaemonThread): # Copy the request method and params to the response response['method'] = method response['params'] = params + # Only once we've received a response to an addr subscription + # add it to the list; avoids double-sends on reconnection + if method == 'blockchain.address.subscribe': + self.subscribed_addresses.add(params[0]) else: if not response: # Closed remotely / misbehaving self.connection_down(interface.server) t@@ -570,10 +574,6 @@ class Network(util.DaemonThread): callback(out) return True - if method == 'blockchain.address.subscribe': - addr = params[0] - self.subscribed_addresses.add(addr) - # This request needs connectivity. If we don't have an # interface, we cannot process it. if not self.interface: