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

     1  package pbftTypes
     2  
     3  import (
     4  	"github.com/ethereum/go-ethereum/p2p/discover"
     5  )
     6  // Peer provides interface for a peer
     7  type Peer_Type int32
     8  
     9  const (
    10  	Peer_UNDEFINED     Peer_Type = 0
    11  	Peer_VALIDATOR     Peer_Type = 1
    12  	Peer_NON_VALIDATOR Peer_Type = 2
    13  )
    14  type Peer interface {
    15  	GetPeerId() *PeerID
    16  	GetType()  Peer_Type
    17  }
    18  type PeerID discover.NodeID
    19  type ReplicaID uint32
    20  type MessageDigest string