fix test
This commit is contained in:
parent
8b44ca5fe0
commit
21ab307969
|
@ -1,4 +1,4 @@
|
|||
from .carnot import *
|
||||
from carnot import *
|
||||
from unittest import TestCase
|
||||
|
||||
|
||||
|
@ -166,19 +166,22 @@ class TestCarnotHappyPath(TestCase):
|
|||
node.received_timeout_qc(timeout_qc)
|
||||
|
||||
# new view votes from leafs
|
||||
for node in (nodes[int_to_id(_id)] for _id in (2, 3, 4)):
|
||||
node.approve_new_view(timeout_qc, set())
|
||||
|
||||
new_views_leafs_3_4 = [nodes[int_to_id(_id)].latest_event for _id in (3, 4)]
|
||||
new_view_leaf_2 = nodes[int_to_id(2)].latest_event
|
||||
|
||||
# new view votes from committee 1 ()
|
||||
node_1: MockCarnot = nodes[int_to_id(1)]
|
||||
node_1.approve_new_view(new_views_leafs_3_4)
|
||||
node_1.approve_new_view(timeout_qc, new_views_leafs_3_4)
|
||||
new_view_1 = node_1.latest_event
|
||||
|
||||
# committee 1 and committee 2 new view votes
|
||||
new_views = [new_view_1, new_view_leaf_2]
|
||||
|
||||
# forward root childs votes to root committee (compound of just the leader in this case)
|
||||
leader.approve_new_view(new_views)
|
||||
leader.approve_new_view(timeout_qc, new_views)
|
||||
root_new_view = leader.latest_event
|
||||
|
||||
leader.propose_block(2, [root_new_view, new_view_1, new_view_leaf_2])
|
||||
|
|
Loading…
Reference in New Issue