From 4f8bde0d87db206f78aff8a9dd698023f01c07ba Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Mon, 18 Jul 2022 00:35:10 +0200 Subject: [PATCH] statesync: Increasing min num of peers --- internal/statesync/reactor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/statesync/reactor.go b/internal/statesync/reactor.go index 3a6599689..e6d136cc2 100644 --- a/internal/statesync/reactor.go +++ b/internal/statesync/reactor.go @@ -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, 2); err != nil { + if err := r.waitForEnoughPeers(ctx, 3); 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, 2); err != nil { + if err := r.waitForEnoughPeers(ctx, 3); err != nil { return sm.State{}, err }