From 19c5fa35923c4f846e6293cb5f80b3db1e608108 Mon Sep 17 00:00:00 2001 From: mjalalzai <33738574+MForensic@users.noreply.github.com> Date: Thu, 30 Mar 2023 17:07:05 -0700 Subject: [PATCH] Test when a block has an old qc --- carnot/test_happy_path.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/carnot/test_happy_path.py b/carnot/test_happy_path.py index e14df81..015daa7 100644 --- a/carnot/test_happy_path.py +++ b/carnot/test_happy_path.py @@ -72,7 +72,7 @@ class TestCarnotHappyPath(TestCase): - def test_receive_block_qc_view_is_higher_than_block_view_number(self): + def test_receive_block_has_an_old_qc(self): carnot = Carnot(int_to_id(0)) genesis_block = self.add_genesis_block(carnot) # 1 @@ -94,5 +94,5 @@ class TestCarnotHappyPath(TestCase): # This block should be rejected based on the condition below in block_is_safe(). # block.view >= self.latest_committed_view and block.view == (standard.view + 1) # block_is_safe() should return false. - block5 = Block(view=3, qc=StandardQc(block=block4.id(), view=4)) + block5 = Block(view=5, qc=StandardQc(block=block3.id(), view=3)) carnot.receive_block(block5) \ No newline at end of file