github.com/MetalBlockchain/metalgo@v1.11.9/snow/engine/common/state_syncer.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package common
     5  
     6  import "context"
     7  
     8  // StateSyncer controls the selection and verification of state summaries
     9  // to drive VM state syncing. It collects the latest state summaries and elicit
    10  // votes on them, making sure that a qualified majority of nodes support the
    11  // selected state summary.
    12  type StateSyncer interface {
    13  	Engine
    14  
    15  	// IsEnabled returns true if the underlying VM wants to perform state sync.
    16  	// Any returned error will be considered fatal.
    17  	IsEnabled(context.Context) (bool, error)
    18  }