mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 08:51:32 +00:00
network: rm dead code; simplify
This commit is contained in:
parent
ab3c3c5ed7
commit
8cd08cc0fa
2 changed files with 1 additions and 17 deletions
|
@ -99,7 +99,6 @@ class Blockchain(util.PrintError):
|
||||||
|
|
||||||
def __init__(self, config, forkpoint, parent_id):
|
def __init__(self, config, forkpoint, parent_id):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.catch_up = None # interface catching up
|
|
||||||
self.forkpoint = forkpoint
|
self.forkpoint = forkpoint
|
||||||
self.checkpoints = constants.net.CHECKPOINTS
|
self.checkpoints = constants.net.CHECKPOINTS
|
||||||
self.parent_id = parent_id
|
self.parent_id = parent_id
|
||||||
|
|
|
@ -198,13 +198,9 @@ class Network(PrintError):
|
||||||
self.bhi_lock = asyncio.Lock()
|
self.bhi_lock = asyncio.Lock()
|
||||||
self.interface_lock = threading.RLock() # <- re-entrant
|
self.interface_lock = threading.RLock() # <- re-entrant
|
||||||
self.callback_lock = threading.Lock()
|
self.callback_lock = threading.Lock()
|
||||||
self.pending_sends_lock = threading.Lock()
|
|
||||||
self.recent_servers_lock = threading.RLock() # <- re-entrant
|
self.recent_servers_lock = threading.RLock() # <- re-entrant
|
||||||
self.blockchains_lock = threading.Lock()
|
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.irc_servers = {} # returned by interface (list from irc)
|
||||||
self.recent_servers = self.read_recent_servers() # note: needs self.recent_servers_lock
|
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')
|
dir_path = os.path.join(self.config.path, 'certs')
|
||||||
util.make_dir(dir_path)
|
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
|
# retry times
|
||||||
self.server_retry_time = time.time()
|
self.server_retry_time = time.time()
|
||||||
self.nodes_retry_time = time.time()
|
self.nodes_retry_time = time.time()
|
||||||
|
@ -608,10 +600,6 @@ class Network(PrintError):
|
||||||
if server in self.interfaces:
|
if server in self.interfaces:
|
||||||
self.close_interface(self.interfaces[server])
|
self.close_interface(self.interfaces[server])
|
||||||
self.notify('interfaces')
|
self.notify('interfaces')
|
||||||
with self.blockchains_lock:
|
|
||||||
for b in blockchain.blockchains.values():
|
|
||||||
if b.catch_up == server:
|
|
||||||
b.catch_up = None
|
|
||||||
|
|
||||||
@aiosafe
|
@aiosafe
|
||||||
async def new_interface(self, server):
|
async def new_interface(self, server):
|
||||||
|
@ -799,9 +787,6 @@ class Network(PrintError):
|
||||||
self.switch_to_interface(self.default_server)
|
self.switch_to_interface(self.default_server)
|
||||||
else:
|
else:
|
||||||
if self.config.is_fee_estimates_update_required():
|
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)
|
await asyncio.sleep(0.1)
|
||||||
|
|
||||||
async def attempt_fee_estimate_update(self):
|
|
||||||
await self.request_fee_estimates(self.interface)
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue