multichannel

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsenterSupport

type ConsenterSupport struct {
	//sharedconfigval是sharedconfig()返回的值
	SharedConfigVal *mockconfig.Orderer

	//BlockCutterVal是BlockCutter()返回的值
	BlockCutterVal *mockblockcutter.Receiver

	//blockbyindex将块编号映射到这些块的检索值
	BlockByIndex map[uint64]*cb.Block

	//blocks是writeblock写入最近创建的块的通道,
	Blocks chan *cb.Block

	//chainIdVal是chainID()返回的值。
	ChainIDVal string

	//heightval是height()返回的值
	HeightVal uint64

	//nextBlockVal存储由最新的createnextBlock()调用创建的块
	NextBlockVal *cb.Block

	//ClassifyMsgVal由ClassifyMsg返回
	ClassifyMsgVal msgprocessor.Classification

	//configseqval作为process*msg的configseq返回
	ConfigSeqVal uint64

	//processnormalmsgerr作为processnormalmsg的错误返回
	ProcessNormalMsgErr error

	//processconfigupdatemsgval作为processconfigupdatemsg的错误返回
	ProcessConfigUpdateMsgVal *cb.Envelope

	//processconfigupdatemsgerr作为processconfigupdatemsg的错误返回
	ProcessConfigUpdateMsgErr error

	//processconfigmsgval作为processconfigmsg的错误返回
	ProcessConfigMsgVal *cb.Envelope

	//processconfigmsgerr由processconfigmsg返回
	ProcessConfigMsgErr error

	//SequenceVal按序列返回
	SequenceVal uint64

	//通过VerifyBlockSignature返回BlockVerificationer
	BlockVerificationErr error
}

ConsenterSupport用于模拟多通道。ConsenterSupport接口 每次写入块时,它都会写入批处理通道以允许同步。

func (*ConsenterSupport) Block

func (mcs *ConsenterSupport) Block(number uint64) *cb.Block

块返回具有给定数字的块,如果找不到,则返回零。

func (*ConsenterSupport) BlockCutter

func (mcs *ConsenterSupport) BlockCutter() blockcutter.Receiver

断块刀具返回断块刀具值

func (*ConsenterSupport) ChainID

func (mcs *ConsenterSupport) ChainID() string

chainID返回与此特定同意者实例关联的链ID

func (*ConsenterSupport) ClassifyMsg

ClassifyMsg返回ClassifyMsgVal、ClassifyMsgErr

func (*ConsenterSupport) CreateNextBlock

func (mcs *ConsenterSupport) CreateNextBlock(data []*cb.Envelope) *cb.Block

createnextblock使用给定的数据创建一个简单的块结构

func (*ConsenterSupport) Height

func (mcs *ConsenterSupport) Height() uint64

height返回与此特定同意者实例关联的链的块数

func (*ConsenterSupport) NewSignatureHeader

func (mcs *ConsenterSupport) NewSignatureHeader() (*cb.SignatureHeader, error)

NewSignatureHeader返回空签名头

func (*ConsenterSupport) ProcessConfigMsg

func (mcs *ConsenterSupport) ProcessConfigMsg(env *cb.Envelope) (*cb.Envelope, uint64, error)

processconfigmsg返回processconfigmsgval、configseqval、processconfigmsgerr

func (*ConsenterSupport) ProcessConfigUpdateMsg

func (mcs *ConsenterSupport) ProcessConfigUpdateMsg(env *cb.Envelope) (config *cb.Envelope, configSeq uint64, err error)

processconfigupdatemsg返回processconfigupdatemsgval、configseqval、processconfigupdatemsgerr

func (*ConsenterSupport) ProcessNormalMsg

func (mcs *ConsenterSupport) ProcessNormalMsg(env *cb.Envelope) (configSeq uint64, err error)

processnormalmsg返回configseqval,processnormalmsgerr

func (*ConsenterSupport) Sequence

func (mcs *ConsenterSupport) Sequence() uint64

序列返回SequenceVal

func (*ConsenterSupport) SharedConfig

func (mcs *ConsenterSupport) SharedConfig() channelconfig.Orderer

sharedconfig返回sharedconfigval

func (*ConsenterSupport) Sign

func (mcs *ConsenterSupport) Sign(message []byte) ([]byte, error)

sign返回传入的字节

func (*ConsenterSupport) VerifyBlockSignature

func (mcs *ConsenterSupport) VerifyBlockSignature(_ []*cb.SignedData, _ *cb.ConfigEnvelope) error

verifyblocksignature验证块的签名

func (*ConsenterSupport) WriteBlock

func (mcs *ConsenterSupport) WriteBlock(block *cb.Block, encodedMetadataValue []byte)

writeblock将数据写入blocks通道

func (*ConsenterSupport) WriteConfigBlock

func (mcs *ConsenterSupport) WriteConfigBlock(block *cb.Block, encodedMetadataValue []byte)

WriteConfigBlock调用WriteBlock

Jump to

Keyboard shortcuts

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