test: fix handling of start height in generated E2E testnets (#5563)

In #5488 the E2E testnet generator changed to setting explicit `StartAt` heights for initial nodes. This broke the runner, which expected all initial nodes to have `StartAt: 0`, as well as validator set scheduling in the generator. Testnet loading now normalizes initial nodes to have `StartAt: 0`.

This also tweaks waiting for misbehavior heights to only use an additional wait if there actually is any misbehavior in the testnet, and to output information when waiting.
This commit is contained in:
Erik Grinaker
2020-10-26 11:09:46 +01:00
committed by Erik Grinaker
parent c4f1b2d7db
commit ceea64ec28
5 changed files with 43 additions and 30 deletions

View File

@@ -104,7 +104,7 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
name := fmt.Sprintf("validator%02d", i)
manifest.Nodes[name] = generateNode(r, e2e.ModeValidator, startAt, i <= 2)
if startAt == 0 {
if startAt == manifest.InitialHeight {
(*manifest.Validators)[name] = int64(30 + r.Intn(71))
} else {
manifest.ValidatorUpdates[fmt.Sprint(startAt+5)] = map[string]int64{