|
@@ -61,7 +61,7 @@ class Server(threading.Thread):
|
|
expiration: Optional[float] = None,
|
|
expiration: Optional[float] = None,
|
|
prefetch_batches: int = 1,
|
|
prefetch_batches: int = 1,
|
|
sender_threads: int = 1,
|
|
sender_threads: int = 1,
|
|
- min_balance_quality: float = 0.75,
|
|
|
|
|
|
+ balance_quality: float = 0.75,
|
|
mean_balance_check_period: float = 150,
|
|
mean_balance_check_period: float = 150,
|
|
mean_block_selection_delay: float = 0.5,
|
|
mean_block_selection_delay: float = 0.5,
|
|
use_auth_token: Optional[str] = None,
|
|
use_auth_token: Optional[str] = None,
|
|
@@ -138,7 +138,7 @@ class Server(threading.Thread):
|
|
raise
|
|
raise
|
|
block_indices = range(first_block_index, last_block_index)
|
|
block_indices = range(first_block_index, last_block_index)
|
|
self.strict_block_indices, self.num_blocks = block_indices, num_blocks
|
|
self.strict_block_indices, self.num_blocks = block_indices, num_blocks
|
|
- self.min_balance_quality = min_balance_quality
|
|
|
|
|
|
+ self.balance_quality = balance_quality
|
|
self.mean_balance_check_period = mean_balance_check_period
|
|
self.mean_balance_check_period = mean_balance_check_period
|
|
self.mean_block_selection_delay = mean_block_selection_delay
|
|
self.mean_block_selection_delay = mean_block_selection_delay
|
|
|
|
|
|
@@ -215,7 +215,7 @@ class Server(threading.Thread):
|
|
return False
|
|
return False
|
|
|
|
|
|
module_infos = get_remote_module_infos(self.dht, self.module_uids, expiration_time=np.inf)
|
|
module_infos = get_remote_module_infos(self.dht, self.module_uids, expiration_time=np.inf)
|
|
- return block_selection.should_choose_other_blocks(self.dht.peer_id, module_infos, self.min_balance_quality)
|
|
|
|
|
|
+ return block_selection.should_choose_other_blocks(self.dht.peer_id, module_infos, self.balance_quality)
|
|
|
|
|
|
def shutdown(self):
|
|
def shutdown(self):
|
|
self.stop.set()
|
|
self.stop.set()
|