myutils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Read

type Read struct {
	Key      string `json:"key"`
	BlockNum uint64 `json:"blocknum"`
	TxNum    uint64 `json:"txnum"`
}

type TransactionInfo

type TransactionInfo struct {
	BlockHeight      uint64 `json:"blockheight"`      //区块高度ttt
	ChannelID        string `json:"channelid"`        //通道名称
	CreateTime       string `json:"createtime"`       //交易创建时间
	ChaincodeID      string `json:"chaincodeid"`      //交易调用链码ID
	ChaincodeVersion string `json:"chaincodeversion"` //交易调用链码版本
	//Nonce            []byte  `json:"channelid"` //随机数
	Mspid string `json:"mspid"` //交易发起者MSPID
	Name  string `json:"name"`  //交易发起者名称
	//OUTypes          string   //交易发起者OU分组
	Args []string `json:"args"` //输入参数
	//Type             int32    `json:"type"`//交易类型
	TxID     string   `json:"channelid"` //交易ID
	ReadSet  []*Read  `json:"channelid"` //读集
	WriteSet []*Write `json:"channelid"` //写集
}

TransactionInfo 解析后的交易信息

func UnmarshalBlock

func UnmarshalBlock(payloadRaw []byte, height uint64) (*TransactionInfo, error)

解析区块

func UnmarshalTransaction

func UnmarshalTransaction(payloadRaw []byte) (*TransactionInfo, error)

UnmarshalTransaction 从某个交易的payload来解析它

type Write

type Write struct {
	Key      string `json:"key"`
	IsDelete bool   `json:"isdelete"`
	Value    string `json:"value"`
}

Jump to

Keyboard shortcuts

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