chainmaker_coder

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 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 CMLightCoder

type CMLightCoder struct {
	// contains filtered or unexported fields
}

CMLightCoder is the implementation of Coder interface for ChainMaker

func NewCMLightCoder

func NewCMLightCoder() *CMLightCoder

NewCMLightCoder creates CMLightCoder

func (*CMLightCoder) DeserializeBlockHeader

func (cms *CMLightCoder) DeserializeBlockHeader(headerBz []byte) (common.Header, error)

DeserializeBlockHeader deserializes binary bytes to ChainMaker's block header

func (*CMLightCoder) DeserializeTransaction

func (cms *CMLightCoder) DeserializeTransaction(transactionBz []byte, extraDataBz []byte) (
	common.Transactioner, error)

DeserializeTransaction deserializes the binary bytes of transaction and extra data(rw_set) to transaction

func (*CMLightCoder) GenerateBlockData

func (cms *CMLightCoder) GenerateBlockData(header common.Header) (*storage.BlockData, error)

GenerateBlockData generates transaction data, contains block hash and block header bytes

func (*CMLightCoder) GenerateTransactionData

func (cms *CMLightCoder) GenerateTransactionData(blocker common.Blocker) (*storage.TransactionData, error)

GenerateTransactionData generates transaction data, contains txHashMap, txBytesMap and txRWSetMap

type CMSPVCoder

type CMSPVCoder struct {
	// contains filtered or unexported fields
}

CMSPVCoder is the implementation of Coder interface for ChainMaker

func NewCMSPVCoder

func NewCMSPVCoder() *CMSPVCoder

NewCMSPVCoder creates CMSPVCoder

func (*CMSPVCoder) DeserializeBlockHeader

func (cms *CMSPVCoder) DeserializeBlockHeader(headerBz []byte) (common.Header, error)

DeserializeBlockHeader deserializes binary bytes to ChainMaker's block header

func (*CMSPVCoder) DeserializeTransaction

func (cms *CMSPVCoder) DeserializeTransaction(transactionBz []byte, extraDataBz []byte) (
	common.Transactioner, error)

DeserializeTransaction deserializes the binary bytes of transaction and extra data(rw_set) to transaction

func (*CMSPVCoder) GenerateBlockData

func (cms *CMSPVCoder) GenerateBlockData(header common.Header) (*storage.BlockData, error)

GenerateBlockData generates transaction data, contains block hash and block header bytes

func (*CMSPVCoder) GenerateTransactionData

func (cms *CMSPVCoder) GenerateTransactionData(blocker common.Blocker) (*storage.TransactionData, error)

GenerateTransactionData generates transaction data, contains txHashMap, txBytesMap and txRWSetMap

Jump to

Keyboard shortcuts

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