From b2d8a7cec2d77db53de23149b6717cd94a852d9d Mon Sep 17 00:00:00 2001 From: Kevan Carstensen Date: Tue, 3 Nov 2009 21:32:41 -0700 Subject: [PATCH] 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. --- src/allmydata/interfaces.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.45.2