Documentation ¶
Index ¶
- func BuildChannelHeader(channelName string, headerType common.HeaderType, txID string, epoch uint64) (*common.ChannelHeader, error)
- func ComputeTxID(nonce []byte, creatorID []byte) (string, error)
- func CreateGenesisBlockRequest(channelName string, creator []byte) []byte
- func GenerateRandomNonce() ([]byte, error)
- func GetLastConfigFromBlock(block *common.Block) (*common.LastConfig, error)
- func MarshalOrPanic(pb proto.Message) []byte
- func NewNewestSeekPosition() *ab.SeekPosition
- func NewSpecificSeekPosition(index uint64) *ab.SeekPosition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildChannelHeader ¶
func BuildChannelHeader(channelName string, headerType common.HeaderType, txID string, epoch uint64) (*common.ChannelHeader, error)
BuildChannelHeader builds a ChannelHeader with the given parameters
func ComputeTxID ¶
ComputeTxID computes a transaction ID from a given nonce and creator ID
func CreateGenesisBlockRequest ¶
CreateGenesisBlockRequest creates a seek request for block 0 on the specified channel. This request is sent to the ordering service to request blocks
func GenerateRandomNonce ¶
GenerateRandomNonce generates a random nonce
func GetLastConfigFromBlock ¶
func GetLastConfigFromBlock(block *common.Block) (*common.LastConfig, error)
GetLastConfigFromBlock returns the LastConfig data from the given block
func MarshalOrPanic ¶
MarshalOrPanic serializes a protobuf message and panics if this operation fails.
func NewNewestSeekPosition ¶
func NewNewestSeekPosition() *ab.SeekPosition
NewNewestSeekPosition returns a SeekPosition that requests the newest block
func NewSpecificSeekPosition ¶
func NewSpecificSeekPosition(index uint64) *ab.SeekPosition
NewSpecificSeekPosition returns a SeekPosition that requests the block at the given index
Types ¶
This section is empty.