Fixed high CPU usage when there are no outbound connections
This commit is contained in:
parent
954f5d793d
commit
69a31d1d83
@ -59,7 +59,7 @@ def block_queue_processing():
|
|||||||
|
|
||||||
|
|
||||||
while not len(gossip_peer_set):
|
while not len(gossip_peer_set):
|
||||||
sleep(0.2)
|
sleep(1)
|
||||||
if dandelion_phase.remaining_time() <= 15:
|
if dandelion_phase.remaining_time() <= 15:
|
||||||
#logger.debug("Sleeping", terminal=True)
|
#logger.debug("Sleeping", terminal=True)
|
||||||
sleep(dandelion_phase.remaining_time())
|
sleep(dandelion_phase.remaining_time())
|
||||||
|
@ -130,7 +130,8 @@ def stream_from_peers():
|
|||||||
|
|
||||||
# spawn stream threads infinitely
|
# spawn stream threads infinitely
|
||||||
while True:
|
while True:
|
||||||
|
if not gossip_peer_set:
|
||||||
|
sleep(2)
|
||||||
available_set = gossip_peer_set - tried_peers
|
available_set = gossip_peer_set - tried_peers
|
||||||
if not len(available_set) and len(tried_peers):
|
if not len(available_set) and len(tried_peers):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user