commit cbf9052daee6789e788c5aad22f000e93d767ca3
parent ebd5a565ed0e9fe5313ecf514739d1240d697e04
Author: Neil Booth <kyuupichan@gmail.com>
Date: Thu, 10 Sep 2015 12:57:04 +0900
Remove address caching
Diffstat:
1 file changed, 0 insertions(+), 10 deletions(-)
diff --git a/lib/network.py b/lib/network.py
@@ -175,8 +175,6 @@ class Network(util.DaemonThread):
# subscriptions and requests
self.subscribed_addresses = set()
- # cached address status
- self.addr_responses = {}
# Requests from client we've not seen a response to
self.unanswered_requests = {}
# retry times
@@ -427,7 +425,6 @@ class Network(util.DaemonThread):
# stop any current interface in order to terminate subscriptions
self.close_interface(self.interface)
self.interface = i
- self.addr_responses = {}
self.send_subscriptions()
self.set_status('connected')
self.notify('updated')
@@ -482,10 +479,6 @@ class Network(util.DaemonThread):
elif method == 'blockchain.block.get_header':
self.on_get_header(interface, response)
else:
- # Cache address subscription results
- if method == 'blockchain.address.subscribe' and error is None:
- addr = response['params'][0]
- self.addr_responses[addr] = response
if callback is None:
params = response['params']
with self.lock:
@@ -580,9 +573,6 @@ class Network(util.DaemonThread):
if method == 'blockchain.address.subscribe':
addr = params[0]
self.subscribed_addresses.add(addr)
- if addr in self.addr_responses:
- callback(self.addr_responses[addr])
- return True
# This request needs connectivity. If we don't have an
# interface, we cannot process it.