Fix DHB test: wait for lagging nodes.

The Dynamic Honey Badger tests would currently fail _without_ faulty
nodes, because with "first" delivery, all but the first _N - f_ nodes
are lagging indefinitely.

This change makes sure we give lagging nodes a chance to finish the first
phase of the test and arrive at the batch containing the completed
`Remove` event.
This commit is contained in:
Andreas Fackler 2018-08-14 11:29:26 +02:00 committed by Andreas Fackler
parent f661e8ace3
commit f7d4860a94
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ where
node_busy(*node)
&& !node.instance().has_input()
&& node.instance().netinfo().is_validator()
// Wait until all nodes have completed removing 0, before inputting `Add`.
&& (input_add || !has_remove(node))
// If there's only one node, it will immediately output on input. Make sure we
// first process all incoming messages before providing input again.
&& (network.nodes.len() > 2 || node.queue.is_empty())