chainmaker_coder

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

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(serializeBlockHeader []byte) (common.Header, error)

DeserializeBlockHeader deserializes binary bytes to ChainMaker's block header

func (*CMLightCoder) DeserializeTransaction

func (cms *CMLightCoder) DeserializeTransaction(serializeTransaction []byte, serializeExtraData []byte) (
	common.Transactioner, error)

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

func (*CMLightCoder) GenerateTransactionData

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

GenerateTransactionData generates transaction data, contains txHashMap, txBytesMap and txRWSetMap

func (*CMLightCoder) SerializeBlockHeader

func (cms *CMLightCoder) SerializeBlockHeader(header common.Header) ([]byte, error)

SerializeBlockHeader serializes ChainMaker's block header to binary bytes

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(serializeBlockHeader []byte) (common.Header, error)

DeserializeBlockHeader deserializes binary bytes to ChainMaker's block header

func (*CMSPVCoder) DeserializeTransaction

func (cms *CMSPVCoder) DeserializeTransaction(serializeTransaction []byte, serializeExtraData []byte) (
	common.Transactioner, error)

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

func (*CMSPVCoder) GenerateTransactionData

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

GenerateTransactionData generates transaction data, contains txHashMap, txBytesMap and txRWSetMap

func (*CMSPVCoder) SerializeBlockHeader

func (cms *CMSPVCoder) SerializeBlockHeader(header common.Header) ([]byte, error)

SerializeBlockHeader serializes ChainMaker's block header to binary bytes

Jump to

Keyboard shortcuts

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