From: Kevan Carstensen Date: Wed, 4 Nov 2009 04:32:41 +0000 (-0700) Subject: Alter the signature of set_shareholders in IEncoder to add a 'servermap' parameter... X-Git-Tag: trac-4300 X-Git-Url: https://git.rkrishnan.org/pf/configuration.rst?a=commitdiff_plain;h=b2d8a7cec2d77db53de23149b6717cd94a852d9d;p=tahoe-lafs%2Ftahoe-lafs.git Alter the signature of set_shareholders in IEncoder to add a 'servermap' parameter, which gives IEncoders enough information to perform a sane check for servers_of_happiness. --- diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index 831fcb6d..5b82f816 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -1338,11 +1338,12 @@ class IEncoder(Interface): Once this is called, set_size() and set_params() may not be called. """ - def set_shareholders(shareholders): + def set_shareholders(shareholders, servermap): """Tell the encoder where to put the encoded shares. 'shareholders' must be a dictionary that maps share number (an integer ranging from - 0 to n-1) to an instance that provides IStorageBucketWriter. This - must be performed before start() can be called.""" + 0 to n-1) to an instance that provides IStorageBucketWriter. + 'servermap' is a dictionary that maps share number (as defined above) + to a peerid. This must be performed before start() can be called.""" def start(): """Begin the encode/upload process. This involves reading encrypted