github.com/cranelv/ethereum_mpc@v0.0.0-20191031014521-23aeb1415092/consensus_pbft/consensusInterface/coordinator.go (about)

     1  package consensusInterface
     2  
     3  import (
     4  	"github.com/ethereum/go-ethereum/consensus_pbft/pbftTypes"
     5  )
     6  // PartialStack is a subset of peer.MessageHandlerCoordinator functionality which is necessary to perform state transfer
     7  // Coordinator is used to initiate state transfer.  Start must be called before use, and Stop should be called to free allocated resources
     8  type Coordinator interface {
     9  	Start() // Start the block transfer go routine
    10  	Stop()  // Stop up the block transfer go routine
    11  
    12  	// SyncToTarget attempts to move the state to the given target, returning an error, and whether this target might succeed if attempted at a later time
    13  	SyncToTarget(blockNumber uint64, digest pbftTypes.MessageDigest, peerIDs []*pbftTypes.PeerID) (error, bool)
    14  }