Helper contains the reference to the peer's MessageHandlerCoordinator
typeHelperstruct{consenterconsensus.Consentercoordinatorpeer.MessageHandlerCoordinatorsecOnboolvalidbool// Whether we believe the state is up to datesecHelpercrypto.PeercurBatch[]*pb.Transaction// TODO, remove after issue 579curBatchErrs[]*pb.TransactionResult// TODO, remove after issue 579persist.Helperexecutorconsensus.Executor}
// ExecutionConsumer allows callbacks from asycnhronous execution and statetransfer
type ExecutionConsumer interface {
Executed(tag interface{}) // Called whenever Execute completes
Committed(tag interface{}, target *pb.BlockchainInfo) // Called whenever Commit completes
RolledBack(tag interface{}) // Called whenever a Rollback completes
StateUpdated(tag interface{}, target *pb.BlockchainInfo) // Called when state transfer completes, if target is nil, this indicates a failure and a new target should be supplied
}
// Consenter is used to receive messages from the network
// Every consensus plugin needs to implement this interface
type Consenter interface {
RecvMsg(msg *pb.Message, senderHandle *pb.PeerID) error // Called serially with incoming messages from gRPC
ExecutionConsumer
}