Update --update_period and --expiration defaults (#410)

pull/411/head
Alexander Borzunov 10 months ago committed by GitHub
parent ffb20b585c
commit fd19c21859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -110,7 +110,7 @@ def main():
'If set to "auto" (default), the script evaluates network and compute throughput '
'on the first run and uses these estimates for future runs. '
'If set to "eval", the script re-evaluates the throughput and overrides the cache.')
parser.add_argument('--update_period', type=float, required=False, default=60,
parser.add_argument('--update_period', type=float, required=False, default=120,
help='Server will report blocks to DHT once in this many seconds')
parser.add_argument('--expiration', type=float, required=False, default=None,
help='DHT entries will expire after this many seconds')

@ -118,7 +118,7 @@ class Server:
self.dht_prefix = dht_prefix
if expiration is None:
expiration = max(3 * update_period, MAX_DHT_TIME_DISCREPANCY_SECONDS)
expiration = max(2 * update_period, MAX_DHT_TIME_DISCREPANCY_SECONDS)
self.expiration = expiration
self.request_timeout = request_timeout

Loading…
Cancel
Save