]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
change Encoder to use py_ecc, now that it works
authorBrian Warner <warner@allmydata.com>
Sat, 6 Jan 2007 01:12:45 +0000 (18:12 -0700)
committerBrian Warner <warner@allmydata.com>
Sat, 6 Jan 2007 01:12:45 +0000 (18:12 -0700)
src/allmydata/encode_new.py

index 10b01fec386c7ecd13ebd53d28eb1a76b2bf57a6..3c136b28e00ae53d58dbc239dc44a3913a861587 100644 (file)
@@ -5,8 +5,7 @@ from allmydata.chunk import HashTree, roundup_pow2
 from Crypto.Cipher import AES
 import sha
 from allmydata.util import mathutil
-from allmydata.util.assertutil import precondition
-from allmydata.encode import ReplicatingEncoder, PyRSEncoder
+from allmydata.encode import PyRSEncoder
 
 def hash(data):
     return sha.new(data).digest()
@@ -91,7 +90,7 @@ class Encoder(object):
         self.num_segments = mathutil.div_ceil(self.file_size, self.segment_size)
 
     def setup_encoder(self):
-        self.encoder = ReplicatingEncoder()
+        self.encoder = PyRSEncoder()
         self.encoder.set_params(self.segment_size, self.required_shares,
                                 self.num_shares)
         self.share_size = self.encoder.get_share_size()