Revert "statesync: Increasing min num of peers"

This reverts commit 4f8bde0d87.
This commit is contained in:
Jasmina Malicevic
2022-07-18 12:26:05 +02:00
parent 7449bb4427
commit 3fd7c1ec46

View File

@@ -279,7 +279,7 @@ func (r *Reactor) OnStart(ctx context.Context) error {
"trustHeight", to.Height, "useP2P", r.cfg.UseP2P)
if r.cfg.UseP2P {
if err := r.waitForEnoughPeers(ctx, 3); err != nil {
if err := r.waitForEnoughPeers(ctx, 2); err != nil {
return err
}
@@ -348,7 +348,7 @@ func (r *Reactor) Sync(ctx context.Context) (sm.State, error) {
// We need at least two peers (for cross-referencing of light blocks) before we can
// begin state sync
if err := r.waitForEnoughPeers(ctx, 3); err != nil {
if err := r.waitForEnoughPeers(ctx, 2); err != nil {
return sm.State{}, err
}