chainmaker_common

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMBlock

type CMBlock struct {
	Block     *cmCommonPb.Block
	RWSetList []*cmCommonPb.TxRWSet // extra data in the block
}

CMBlock packages ChainMaker's block

func (*CMBlock) GetBlockHash

func (cmb *CMBlock) GetBlockHash() []byte

GetBlockHash returns block hash

func (*CMBlock) GetBlockHeader

func (cmb *CMBlock) GetBlockHeader() common.Header

GetBlockHeader returns block header

func (*CMBlock) GetChainId

func (cmb *CMBlock) GetChainId() string

GetChainId returns chainId

func (*CMBlock) GetExtraData

func (cmb *CMBlock) GetExtraData() interface{}

GetExtraData returns RWSetList in the block

func (*CMBlock) GetHeight

func (cmb *CMBlock) GetHeight() uint64

GetHeight returns block height

func (*CMBlock) GetPreHash

func (cmb *CMBlock) GetPreHash() []byte

GetPreHash returns the hash value of previous block

func (*CMBlock) GetTransaction

func (cmb *CMBlock) GetTransaction() []common.Transactioner

GetTransaction returns transactions in the block

func (*CMBlock) GetTxRoot

func (cmb *CMBlock) GetTxRoot() []byte

GetTxRoot returns the root hash of transaction tree

type CMBlockHeader

type CMBlockHeader struct {
	BlockHeader *cmCommonPb.BlockHeader
}

CMBlockHeader packages ChainMaker's block header

func (*CMBlockHeader) GetBlockHash

func (cmh *CMBlockHeader) GetBlockHash() []byte

GetBlockHash returns block hash

func (*CMBlockHeader) GetChainId

func (cmh *CMBlockHeader) GetChainId() string

GetChainId returns chainId

func (*CMBlockHeader) GetHeight

func (cmh *CMBlockHeader) GetHeight() uint64

GetHeight returns block height

func (*CMBlockHeader) GetPreHash

func (cmh *CMBlockHeader) GetPreHash() []byte

GetPreHash returns the hash value of previous block

func (*CMBlockHeader) GetTxRoot

func (cmh *CMBlockHeader) GetTxRoot() []byte

GetTxRoot returns the root hash of transaction tree

type CMTransaction

type CMTransaction struct {
	Transaction *cmCommonPb.Transaction
	RWSet       *cmCommonPb.TxRWSet // extra data in the transaction for ChainMaker light
}

CMTransaction packages ChainMaker's Transaction

func (*CMTransaction) GetContractName

func (tx *CMTransaction) GetContractName() (string, error)

GetContractName returns the contract name of transaction

func (*CMTransaction) GetExtraData

func (tx *CMTransaction) GetExtraData() (interface{}, error)

GetExtraData returns extra data(rw_set) of transaction

func (*CMTransaction) GetMethod

func (tx *CMTransaction) GetMethod() (string, error)

GetMethod returns the method in contract method of transaction

func (*CMTransaction) GetParams

func (tx *CMTransaction) GetParams() ([]interface{}, error)

GetParams returns parameters of transaction

func (*CMTransaction) GetStatusCode

func (tx *CMTransaction) GetStatusCode() int32

GetStatusCode returns the transaction status code

func (*CMTransaction) GetTransactionHash

func (tx *CMTransaction) GetTransactionHash() ([]byte, error)

GetTransactionHash returns transaction hash

Jump to

Keyboard shortcuts

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