github.com/MetalBlockchain/metalgo@v1.11.9/snow/engine/snowman/bootstrap/config.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package bootstrap
     5  
     6  import (
     7  	"github.com/MetalBlockchain/metalgo/database"
     8  	"github.com/MetalBlockchain/metalgo/network/p2p"
     9  	"github.com/MetalBlockchain/metalgo/snow"
    10  	"github.com/MetalBlockchain/metalgo/snow/engine/common"
    11  	"github.com/MetalBlockchain/metalgo/snow/engine/common/tracker"
    12  	"github.com/MetalBlockchain/metalgo/snow/engine/snowman/block"
    13  	"github.com/MetalBlockchain/metalgo/snow/validators"
    14  )
    15  
    16  type Config struct {
    17  	common.AllGetsServer
    18  
    19  	Ctx     *snow.ConsensusContext
    20  	Beacons validators.Manager
    21  
    22  	SampleK          int
    23  	StartupTracker   tracker.Startup
    24  	Sender           common.Sender
    25  	BootstrapTracker common.BootstrapTracker
    26  	Timer            common.Timer
    27  
    28  	// PeerTracker manages the set of nodes that we fetch the next block from.
    29  	PeerTracker *p2p.PeerTracker
    30  
    31  	// This node will only consider the first [AncestorsMaxContainersReceived]
    32  	// containers in an ancestors message it receives.
    33  	AncestorsMaxContainersReceived int
    34  
    35  	// Database used to track the fetched, but not yet executed, blocks during
    36  	// bootstrapping.
    37  	DB database.Database
    38  
    39  	VM block.ChainVM
    40  
    41  	Bootstrapped func()
    42  }