fabricutils

package
v0.0.0-...-1340fc4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBlockHash

func GenerateBlockHash(previousHash, dataHash []byte, blockNumber uint64) string

Generates block hash from previous hash, data hash and block number.

func IndexOfChaincode

func IndexOfChaincode(array []fabricsetup.Chaincode, name string) int

func ReturnCreatorOrgString

func ReturnCreatorOrgString(bytes []byte) string

func ReturnCreatorString

func ReturnCreatorString(bytes []byte) string

This function is borrowed from an opensource project: https://github.com/ale-aso/fabric-examples/blob/master/blockparser.go It returns the creator certificate for the specified transaction.

func TypeCodeToInfo

func TypeCodeToInfo(typeCode int32) string

Decodes the type of the transaction into string

Types

type Readset

type Readset struct {
	Namespace string `json:"namespace"`
	Key       string `json:"key"`
}

type Writeset

type Writeset struct {
	Namespace string      `json:"namespace"`
	Key       string      `json:"key"`
	Value     interface{} `json:"value"`
	IsDelete  bool        `json:"isDelete"`
}

Jump to

Keyboard shortcuts

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