mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-10 04:09:58 +00:00
pyfec: weaken preconditions -- you can have up to 256 shares, and you don't have to pad the individual shares except to make them all the same length
This commit is contained in:
parent
57779e2796
commit
9a39ec9f4e
@ -71,10 +71,10 @@ def pad_size(n, k):
|
||||
return 0
|
||||
|
||||
def _test_random():
|
||||
m = random.randrange(1, 255)
|
||||
m = random.randrange(1, 257)
|
||||
k = random.randrange(1, m+1)
|
||||
l = random.randrange(0, 2**16)
|
||||
ss = [ randstr(l/k) + '\x00' * pad_size(l/k, k) for x in range(k) ]
|
||||
ss = [ randstr(l/k) for x in range(k) ]
|
||||
_h(k, m, ss)
|
||||
|
||||
def test_random():
|
||||
|
Loading…
x
Reference in New Issue
Block a user