Documentation ¶
Index ¶
- type ConsenterSupport
- func (mcs *ConsenterSupport) Block(number uint64) *cb.Block
- func (mcs *ConsenterSupport) BlockCutter() blockcutter.Receiver
- func (mcs *ConsenterSupport) ChainID() string
- func (mcs *ConsenterSupport) ClassifyMsg(chdr *cb.ChannelHeader) msgprocessor.Classification
- func (mcs *ConsenterSupport) CreateNextBlock(data []*cb.Envelope) *cb.Block
- func (mcs *ConsenterSupport) Height() uint64
- func (mcs *ConsenterSupport) NewSignatureHeader() (*cb.SignatureHeader, error)
- func (mcs *ConsenterSupport) ProcessConfigMsg(env *cb.Envelope) (*cb.Envelope, uint64, error)
- func (mcs *ConsenterSupport) ProcessConfigUpdateMsg(env *cb.Envelope) (config *cb.Envelope, configSeq uint64, err error)
- func (mcs *ConsenterSupport) ProcessNormalMsg(env *cb.Envelope) (configSeq uint64, err error)
- func (mcs *ConsenterSupport) Sequence() uint64
- func (mcs *ConsenterSupport) SharedConfig() channelconfig.Orderer
- func (mcs *ConsenterSupport) Sign(message []byte) ([]byte, error)
- func (mcs *ConsenterSupport) VerifyBlockSignature(_ []*cb.SignedData, _ *cb.ConfigEnvelope) error
- func (mcs *ConsenterSupport) WriteBlock(block *cb.Block, encodedMetadataValue []byte)
- func (mcs *ConsenterSupport) WriteConfigBlock(block *cb.Block, encodedMetadataValue []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsenterSupport ¶
type ConsenterSupport struct { 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 }SharedConfigVal *
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 ¶
func (mcs *ConsenterSupport) ClassifyMsg(chdr *cb.ChannelHeader) msgprocessor.Classification
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 ¶
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) 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
Click to show internal directories.
Click to hide internal directories.