Skip to content

Commit

Permalink
chore: add explicit check for seq of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
acud committed Jul 11, 2024
1 parent a931632 commit 9fc1d38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hare4/hare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1359,8 +1359,7 @@ func TestHare_ReconstructCollision(t *testing.T) {
cluster.partitionSigners()
}
layer := tst.genesis + 1
cluster.drainInteractiveMessages()
cluster.setup()

// scenario:
// node 1 has generated 1 proposal that (mocked) hash into 0xab as prefix - both nodes know the proposal
// node 2 has generated 1 proposal that hash into 0xab (but node 1 doesn't know about it)
Expand All @@ -1370,6 +1369,11 @@ func TestHare_ReconstructCollision(t *testing.T) {
// failed signature vs. hashes colliding - there's a difference in number of single prefixes
// that are sent, but the response should be the same)

go func() { <-cluster.nodes[1].tracer.compactReq }() // node 2 gets the request
go func() { <-cluster.nodes[0].tracer.compactResp }() // node 1 gets the response

cluster.setup()

cluster.genProposals(layer, 1)
cluster.genProposalNode(layer, 1)
cluster.movePreround(layer)
Expand Down

0 comments on commit 9fc1d38

Please sign in to comment.