From 0fa9f5edd2ecc3f60a934d45de9a537cc993bfaa Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Quiros Date: Tue, 5 Mar 2024 18:17:28 +0100 Subject: [PATCH] Update encode row test --- da/test_encoder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/da/test_encoder.py b/da/test_encoder.py index f1a5e45..2d52bb0 100644 --- a/da/test_encoder.py +++ b/da/test_encoder.py @@ -14,7 +14,7 @@ class TestEncoder(TestCase): def setUp(self): self.params: DAEncoderParams = DAEncoderParams(column_count=16, bytes_per_field_element=32) self.encoder: DAEncoder = DAEncoder(self.params) - self.elements = 16 + self.elements = 100 self.data = bytearray( chain.from_iterable( randrange(BLS_MODULUS).to_bytes(length=self.params.bytes_per_field_element, byteorder='big') @@ -49,6 +49,7 @@ class TestEncoder(TestCase): chunks_matrix = self.encoder._chunkify_data(self.data) extended_chunks_matrix = self.encoder._rs_encode_rows(chunks_matrix) for r1, r2 in zip(chunks_matrix, extended_chunks_matrix): + self.assertEqual(len(r1), len(r2)//2) r2 = [BLSFieldElement.from_bytes(x) for x in batched(r2, self.params.bytes_per_field_element)] poly_1 = kzg.bytes_to_polynomial(r1) # we check against decoding so we now the encoding was properly done