From: Brian Warner Date: Sat, 6 Jan 2007 01:12:45 +0000 (-0700) Subject: change Encoder to use py_ecc, now that it works X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~395 X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=cf04073e98396691516b977f0724070ddc7b383f;p=tahoe-lafs%2Ftahoe-lafs.git change Encoder to use py_ecc, now that it works --- diff --git a/src/allmydata/encode_new.py b/src/allmydata/encode_new.py index 10b01fec..3c136b28 100644 --- a/src/allmydata/encode_new.py +++ b/src/allmydata/encode_new.py @@ -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()