Documentation ¶
Index ¶
- type ConsenterSupport
- func (mcs *ConsenterSupport) BlockCutter() blockcutter.Receiver
- func (mcs *ConsenterSupport) ChainID() string
- func (mcs *ConsenterSupport) CreateNextBlock(data []*cb.Envelope) *cb.Block
- func (mcs *ConsenterSupport) NewSignatureHeader() (*cb.SignatureHeader, error)
- func (mcs *ConsenterSupport) SharedConfig() config.Orderer
- func (mcs *ConsenterSupport) Sign(message []byte) ([]byte, error)
- func (mcs *ConsenterSupport) WriteBlock(block *cb.Block, _committers []filter.Committer, encodedMetadataValue []byte) *cb.Block
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsenterSupport ¶
type ConsenterSupport struct { mockconfigtxorderer.SharedConfig // BlockCutterVal is the value returned by BlockCutter() BlockCutterVal *mockblockcutter.Receiver // Batches is the channel which WriteBlock writes data to Batches chan []*cb.Envelope // ChainIDVal is the value returned by ChainID() ChainIDVal string // NextBlockVal stores the block created by the most recent CreateNextBlock() call NextBlockVal *cb.Block // WriteBlockVal stores the block created by the most recent WriteBlock() call WriteBlockVal *cb.Block }SharedConfigVal *
ConsenterSupport is used to mock the multichain.ConsenterSupport interface Whenever a block is written, it writes to the Batches channel to allow for synchronization
func (*ConsenterSupport) BlockCutter ¶
func (mcs *ConsenterSupport) BlockCutter() blockcutter.Receiver
BlockCutter returns BlockCutterVal
func (*ConsenterSupport) ChainID ¶
func (mcs *ConsenterSupport) ChainID() string
ChainID returns the chain ID this specific consenter instance is associated with
func (*ConsenterSupport) CreateNextBlock ¶
func (mcs *ConsenterSupport) CreateNextBlock(data []*cb.Envelope) *cb.Block
CreateNextBlock creates a simple block structure with the given data
func (*ConsenterSupport) NewSignatureHeader ¶
func (mcs *ConsenterSupport) NewSignatureHeader() (*cb.SignatureHeader, error)
NewSignatureHeader returns an empty signature header
func (*ConsenterSupport) SharedConfig ¶
func (mcs *ConsenterSupport) SharedConfig() config.Orderer
SharedConfig returns SharedConfigVal
func (*ConsenterSupport) Sign ¶
func (mcs *ConsenterSupport) Sign(message []byte) ([]byte, error)
Sign returns the bytes passed in
func (*ConsenterSupport) WriteBlock ¶
func (mcs *ConsenterSupport) WriteBlock(block *cb.Block, _committers []filter.Committer, encodedMetadataValue []byte) *cb.Block
WriteBlock writes data to the Batches channel Note that _committers is ignored by this mock implementation
Click to show internal directories.
Click to hide internal directories.