allow the introducer to set default encoding parameters. Closes #84.

By writing something like "25 75 100" into a file named 'encoding_parameters'
in the central Introducer's base directory, all clients which use that
introducer will be advised to use 25-out-of-100 encoding for files (i.e.
100 shares will be produced, 25 are required to reconstruct, and the upload
process will be happy if it can find homes for at least 75 shares). The
default values are "3 7 10". For small meshes, the defaults are probably
good, but for larger ones it may be appropriate to increase the number of
shares.
This commit is contained in:
Brian Warner
2007-07-12 15:33:30 -07:00
parent def63d193e
commit 5399395c27
10 changed files with 111 additions and 13 deletions

View File

@ -150,6 +150,11 @@ class Client(node.Node, Referenceable):
results.sort()
return results
def get_encoding_parameters(self):
if not self.introducer_client:
return None
return self.introducer_client.encoding_parameters
def connected_to_introducer(self):
if self.introducer_client:
return self.introducer_client.connected_to_introducer()