mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Add Ability to Resync Node (#4279)
* add resyncing functionality * add more validation to status message * lint and build * jim's review * preston's review * clean up * remove log * remove no sync * change again * change back * remove spaces * Update shared/slotutil/slottime.go Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com> * Apply suggestions from code review Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com> * fix refs * raul's review * goimports * goimports * add counter * removed condition * change back * gaz Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/go-ssz"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
@@ -146,3 +147,10 @@ func (r *Service) validatePendingSlots() error {
|
||||
oldBlockRoots = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *Service) clearPendingSlots() {
|
||||
r.pendingQueueLock.Lock()
|
||||
defer r.pendingQueueLock.Unlock()
|
||||
r.slotToPendingBlocks = make(map[uint64]*ethpb.BeaconBlock)
|
||||
r.seenPendingBlocks = make(map[[32]byte]bool)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user