bump kasten version

This commit is contained in:
Kevin Froman 2020-12-27 04:25:05 +00:00
parent 45577ede2f
commit b0dc7d75e5
3 changed files with 10 additions and 10 deletions

View File

@ -1,2 +1,2 @@
kasten==1.0.1
kasten==2.0.0
PyNaCl==1.4.0

View File

@ -42,9 +42,9 @@ cffi==1.14.4 \
--hash=sha256:f60567825f791c6f8a592f3c6e3bd93dd2934e3f9dac189308426bd76b00ef3b \
--hash=sha256:f803eaa94c2fcda012c047e62bc7a51b0bdabda1cad7a92a522694ea2d76e49f \
# via pynacl
kasten==1.0.1 \
--hash=sha256:b93b2bfef59f5b4cd2c1f62b8d9bec861bb90d2d769ef6d835aaa7b7cd97e93f \
--hash=sha256:d801e67e303c1461ba3eb10bdf4eafe10f91df3a6b6adb45f5ac1c670c630294 \
kasten==2.0.0 \
--hash=sha256:14e2f3b271c0186f4d31c7438f2b9e9406cadf73549ba7003a3fd452604c35e8 \
--hash=sha256:64cf38521fd5faf89abd71839a3dde8f687536c56c699d7adb3aa31af8c9c97c \
# via -r requirements.in
mimcvdf==1.1.0 \
--hash=sha256:97a4ccdebb58352c64c268d2e57ef8817c9fe4ac3dcc922410bfcc72033f344a \

View File

@ -16,25 +16,25 @@ class TestUniversalRules(unittest.TestCase):
def test_block_future_skew_ok(self):
t = floor(time()) + 120
packed = kasten.generator.pack.pack(b"1"*10, b"tst", 0, timestamp=t)
packed = kasten.generator.pack.pack(b"1"*10, b"tst", timestamp=t)
universalrules.check_block_sanity(packed)
def test_block_future_skew_not_ok(self):
t = floor(time()) + 121
packed = kasten.generator.pack.pack(b"1"*10, b"tst", 0, timestamp=t)
packed = kasten.generator.pack.pack(b"1"*10, b"tst", timestamp=t)
self.assertRaises(
universalrules.BlockFutureSkewedBeyondMax,
universalrules.check_block_sanity, packed)
def test_block_not_expired(self):
packed = kasten.generator.pack.pack(b"1"*10, b"tst", 0, app_metadata={"expire": 7})
packed = kasten.generator.pack.pack(b"1"*10, b"tst", app_metadata={"expire": 7})
self.assertRaises(
universalrules.BlockExpired,
universalrules.check_block_sanity, packed)
def test_block_expired(self):
t = floor(time()) - 6
packed = kasten.generator.pack.pack(b"1"*10, b"tst", 0, timestamp=t, app_metadata={"expire": 6})
packed = kasten.generator.pack.pack(b"1"*10, b"tst", timestamp=t, app_metadata={"expire": 6})
self.assertRaises(
universalrules.BlockExpired,
universalrules.check_block_sanity, packed)
@ -43,10 +43,10 @@ class TestUniversalRules(unittest.TestCase):
t = floor(time()) - 6
bls = []
for i in range(3):
packed = kasten.generator.pack.pack(b"1"*2*i, b"tst", 0, timestamp=t)
packed = kasten.generator.pack.pack(b"1"*2*i, b"tst", timestamp=t)
k = anonvdf.AnonVDFGenerator.generate(packed, 1000)
bls.append(k.id)
packed = kasten.generator.pack.pack(b"1"*2*1, b"tst", 0, timestamp=t)
packed = kasten.generator.pack.pack(b"1"*2*1, b"tst", timestamp=t)
k = anonvdf.AnonVDFGenerator.generate(packed, 1000)
self.assertRaises(universalrules.BlockExistsError, universalrules.checksum_exists_in_list, k.id, bls)