mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
e2e: avoid seed nodes when statesyncing (#7006)
This commit is contained in:
@@ -275,7 +275,17 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
|
||||
}
|
||||
})
|
||||
for i, name := range peerNames {
|
||||
if len(seedNames) > 0 && (i == 0 || r.Float64() >= 0.5) {
|
||||
// there are seeds, statesync is disabled, and it's
|
||||
// either the first peer by the sort order, and
|
||||
// (randomly half of the remaining peers use a seed
|
||||
// node; otherwise, choose some remaining set of the
|
||||
// peers.
|
||||
|
||||
if len(seedNames) > 0 &&
|
||||
manifest.Nodes[name].StateSync == e2e.StateSyncDisabled &&
|
||||
(i == 0 || r.Float64() >= 0.5) {
|
||||
|
||||
// choose one of the seeds
|
||||
manifest.Nodes[name].Seeds = uniformSetChoice(seedNames).Choose(r)
|
||||
} else if i > 0 {
|
||||
peers := uniformSetChoice(peerNames[:i])
|
||||
|
||||
Reference in New Issue
Block a user