Browse Source

e2e: limit legacyp2p and statesyncp2p (#7361)

pull/7374/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
a3021be8e6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      test/e2e/generator/generate.go

+ 20
- 0
test/e2e/generator/generate.go View File

@ -105,6 +105,21 @@ func Generate(r *rand.Rand, opts Options) ([]e2e.Manifest, error) {
continue 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) manifests = append(manifests, manifest)
} }
@ -218,6 +233,11 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
hybridNumLegacy-- hybridNumLegacy--
node.UseLegacyP2P = false node.UseLegacyP2P = false
} }
if node.StartAt > manifest.InitialHeight {
hybridNumLegacy--
node.UseLegacyP2P = false
}
} else { } else {
hybridNumNew++ hybridNumNew++
if hybridNumLegacy == 0 { if hybridNumLegacy == 0 {


Loading…
Cancel
Save