fabric_tools

package
v0.0.0-...-f30a169 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlockDataHash

func GetBlockDataHash(blockData *fabCommonPb.BlockData) []byte

GetBlockDataHash calc data hash by block data

func GetBlockHash

func GetBlockHash(header *fabCommonPb.BlockHeader) []byte

GetBlockHash calc block hash for fabric

func GetEnvelopeByBytes

func GetEnvelopeByBytes(data []byte) *fabCommonPb.Envelope

GetEnvelopeByBytes gets an envelope from a block's Data field.

func GetTransactionChannelId

func GetTransactionChannelId(envelope *fabCommonPb.Envelope) (string, error)

GetTransactionChannelId parses transaction for fabric to get channelId

func GetTransactionContractData

func GetTransactionContractData(envelope *fabCommonPb.Envelope) (string, [][]byte, error)

GetTransactionContractData parses transaction for fabric to get contract name and args

func GetTransactionId

func GetTransactionId(envelope *fabCommonPb.Envelope) (string, error)

GetTransactionId parses transaction for fabric to get transaction id

func GetValidationCodeByMetadata

func GetValidationCodeByMetadata(index int, meta *fabCommonPb.BlockMetadata) int32

GetValidationCodeByMetadata gets tx validation code in the block metadata

func NewBlock

func NewBlock() *fabCommonPb.Block

NewBlock and NewEnvelope is test tools

func NewEnvelope

func NewEnvelope() *fabCommonPb.Envelope

Types

This section is empty.

Jump to

Keyboard shortcuts

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