electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8cd08cc0fa9b59dd987fde04b44fb89d970e60ad
parent ab3c3c5ed74b4a1d5ab29e952f487d4141fc3d98
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed, 12 Sep 2018 01:40:54 +0200

network: rm dead code; simplify

Diffstat:
Melectrum/blockchain.py | 1-
Melectrum/network.py | 17+----------------
2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/electrum/blockchain.py b/electrum/blockchain.py @@ -99,7 +99,6 @@ class Blockchain(util.PrintError): def __init__(self, config, forkpoint, parent_id): self.config = config - self.catch_up = None # interface catching up self.forkpoint = forkpoint self.checkpoints = constants.net.CHECKPOINTS self.parent_id = parent_id diff --git a/electrum/network.py b/electrum/network.py @@ -198,13 +198,9 @@ class Network(PrintError): self.bhi_lock = asyncio.Lock() self.interface_lock = threading.RLock() # <- re-entrant self.callback_lock = threading.Lock() - self.pending_sends_lock = threading.Lock() self.recent_servers_lock = threading.RLock() # <- re-entrant self.blockchains_lock = threading.Lock() - self.pending_sends = [] - self.message_id = 0 - self.debug = False self.irc_servers = {} # returned by interface (list from irc) self.recent_servers = self.read_recent_servers() # note: needs self.recent_servers_lock @@ -217,10 +213,6 @@ class Network(PrintError): dir_path = os.path.join(self.config.path, 'certs') util.make_dir(dir_path) - # subscriptions and requests - self.h2addr = {} - # Requests from client we've not seen a response to - self.unanswered_requests = {} # retry times self.server_retry_time = time.time() self.nodes_retry_time = time.time() @@ -608,10 +600,6 @@ class Network(PrintError): if server in self.interfaces: self.close_interface(self.interfaces[server]) self.notify('interfaces') - with self.blockchains_lock: - for b in blockchain.blockchains.values(): - if b.catch_up == server: - b.catch_up = None @aiosafe async def new_interface(self, server): @@ -799,9 +787,6 @@ class Network(PrintError): self.switch_to_interface(self.default_server) else: if self.config.is_fee_estimates_update_required(): - await self.interface.group.spawn(self.attempt_fee_estimate_update()) + await self.interface.group.spawn(self.request_fee_estimates(self.interface)) await asyncio.sleep(0.1) - - async def attempt_fee_estimate_update(self): - await self.request_fee_estimates(self.interface)