e2e: limit legacyp2p and statesyncp2p (#7361)

This commit is contained in:
Sam Kleinman
2021-12-01 16:22:17 -05:00
committed by GitHub
parent 657afc7322
commit a3021be8e6
+20
View File
@@ -105,6 +105,21 @@ func Generate(r *rand.Rand, opts Options) ([]e2e.Manifest, error) {
continue
}
if opt["p2p"] == HybridP2PMode {
numLegacy := 0
for _, n := range manifest.Nodes {
if n.UseLegacyP2P {
numLegacy++
}
}
if numLegacy == len(manifest.Nodes) {
continue
}
if numLegacy == 0 {
continue
}
}
manifests = append(manifests, manifest)
}
@@ -218,6 +233,11 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
hybridNumLegacy--
node.UseLegacyP2P = false
}
if node.StartAt > manifest.InitialHeight {
hybridNumLegacy--
node.UseLegacyP2P = false
}
} else {
hybridNumNew++
if hybridNumLegacy == 0 {