Documentation ¶
Index ¶
- Constants
- func NewBlock(seqNum uint64, previousHash []byte) *common.Block
- type Orderer
- type Peer
- func (p *Peer) Addrs() string
- func (p *Peer) Deliver(peer.Deliver_DeliverServer) error
- func (p *Peer) DeliverFiltered(srv peer.Deliver_DeliverFilteredServer) error
- func (p *Peer) DeliverWithPrivateData(peer.Deliver_DeliverWithPrivateDataServer) error
- func (p *Peer) Pause()
- func (p *Peer) ProcessProposal(context.Context, *peer.SignedProposal) (*peer.ProposalResponse, error)
- func (p *Peer) Start()
- func (p *Peer) Stop()
- func (p *Peer) Unpause()
- type Server
Constants ¶
View Source
const MockTxSize = 1000
this is the channel size for mock server, peer and orderer when use or send tx to mock server/peer/orderer try not over this size to avoid hang up or over size
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Orderer ¶
type Orderer struct { Listener net.Listener GrpcServer *grpc.Server TxCs []chan struct{} SelfC chan struct{} // contains filtered or unexported fields }
func NewOrderer ¶
func NewOrderer(txCs []chan struct{}, credentials credentials.TransportCredentials) (*Orderer, error)
func (*Orderer) Broadcast ¶
func (o *Orderer) Broadcast(srv orderer.AtomicBroadcast_BroadcastServer) error
type Peer ¶
type Peer struct { Listener net.Listener GrpcServer *grpc.Server BlkSize uint64 TxC chan struct{} // contains filtered or unexported fields }
func NewPeer ¶
func NewPeer(TxC chan struct{}, credentials credentials.TransportCredentials) (*Peer, error)
func (*Peer) DeliverFiltered ¶
func (p *Peer) DeliverFiltered(srv peer.Deliver_DeliverFilteredServer) error
func (*Peer) DeliverWithPrivateData ¶
func (p *Peer) DeliverWithPrivateData(peer.Deliver_DeliverWithPrivateDataServer) error
func (*Peer) ProcessProposal ¶
func (p *Peer) ProcessProposal(context.Context, *peer.SignedProposal) (*peer.ProposalResponse, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(peerN int, credentials credentials.TransportCredentials) (*Server, error)
func (*Server) PeersAddresses ¶
Click to show internal directories.
Click to hide internal directories.