blocksprovider

package
v2.0.0-beta+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockVerifier

type BlockVerifier interface {
	VerifyBlock(channelID gossipcommon.ChannelID, blockNum uint64, block *common.Block) error
}

type DeliverStreamer

type DeliverStreamer interface {
	Deliver(context.Context, *grpc.ClientConn) (orderer.AtomicBroadcast_DeliverClient, error)
}

type Deliverer

type Deliverer struct {
	ChannelID       string
	Gossip          GossipServiceAdapter
	Ledger          LedgerInfo
	BlockVerifier   BlockVerifier
	Dialer          Dialer
	Orderers        OrdererConnectionSource
	DoneC           chan struct{}
	Signer          identity.SignerSerializer
	DeliverStreamer DeliverStreamer
	Logger          *flogging.FabricLogger

	MaxRetryDelay     time.Duration
	InitialRetryDelay time.Duration
	MaxRetryDuration  time.Duration

	// TLSCertHash should be nil when TLS is not enabled
	TLSCertHash []byte // util.ComputeSHA256(b.credSupport.GetClientCertificate().Certificate[0])
	// contains filtered or unexported fields
}

Deliverer the actual implementation for BlocksProvider interface

func (*Deliverer) DeliverBlocks

func (d *Deliverer) DeliverBlocks()

DeliverBlocks used to pull out blocks from the ordering service to distributed them across peers

func (*Deliverer) Stop

func (d *Deliverer) Stop()

Stop stops blocks delivery provider

type Dialer

type Dialer interface {
	Dial(address string, certPool *x509.CertPool) (*grpc.ClientConn, error)
}

type GossipServiceAdapter

type GossipServiceAdapter interface {
	// AddPayload adds payload to the local state sync buffer
	AddPayload(chainID string, payload *gossip.Payload) error

	// Gossip the message across the peers
	Gossip(msg *gossip.GossipMessage)
}

GossipServiceAdapter serves to provide basic functionality required from gossip service by delivery service

type LedgerInfo

type LedgerInfo interface {
	// LedgerHeight returns current local ledger height
	LedgerHeight() (uint64, error)
}

LedgerInfo an adapter to provide the interface to query the ledger committer for current ledger height

type OrdererConnectionSource

type OrdererConnectionSource interface {
	RandomEndpoint() (*orderers.Endpoint, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL