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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FabricCoder

type FabricCoder struct{}

FabricCoder is the implementation of Coder interface for Fabric

func NewFabricCoder

func NewFabricCoder() *FabricCoder

NewFabricCoder creates FabricCoder

func (*FabricCoder) DeserializeBlockHeader

func (fc *FabricCoder) DeserializeBlockHeader(headerBz []byte) (common.Header, error)

DeserializeBlockHeader deserializes binary bytes to Fabric's block header

func (*FabricCoder) DeserializeTransaction

func (fc *FabricCoder) DeserializeTransaction(transactionBz []byte, extraDataBz []byte) (
	common.Transactioner, error)

DeserializeTransaction deserializes the binary bytes of transaction and extra data to transaction

func (*FabricCoder) GenerateBlockData

func (fc *FabricCoder) GenerateBlockData(header common.Header) (*storage.BlockData, error)

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

func (*FabricCoder) GenerateTransactionData

func (fc *FabricCoder) GenerateTransactionData(blocker common.Blocker) (*storage.TransactionData, error)

GenerateTransactionData generates transaction data, only contains tx hash map with the txs in block

Jump to

Keyboard shortcuts

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