Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion snow/engine/common/bootstrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ type Bootstrapper struct {
acceptedVotes map[[32]byte]uint64

// current weight
weight uint64
started bool
weight uint64
}

// Initialize implements the Engine interface.
Expand All @@ -67,6 +68,7 @@ func (b *Bootstrapper) Initialize(config Config) error {

// Startup implements the Engine interface.
func (b *Bootstrapper) Startup() error {
b.started = true
if b.pendingAcceptedFrontier.Len() == 0 {
b.Ctx.Log.Info("Bootstrapping skipped due to no provided bootstraps")
return b.Bootstrapable.ForceAccepted(ids.Set{})
Expand Down Expand Up @@ -180,6 +182,9 @@ func (b *Bootstrapper) Accepted(validatorID ids.ShortID, requestID uint32, conta

// Connected implements the Engine interface.
func (b *Bootstrapper) Connected(validatorID ids.ShortID) error {
if b.started {
return nil
}
weight, ok := b.Beacons.GetWeight(validatorID)
if !ok {
return nil
Expand Down