blockhandler

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package blockhandler provides functionality for fetching blocks from blockchain

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigEnvelopeFromBlock

func ConfigEnvelopeFromBlock(block *fabcommon.Block) (*fabcommon.Envelope, string, error)

ConfigEnvelopeFromBlock extracts configuration envelope from the block based on the config type, i.e. HeaderType_ORDERER_TRANSACTION or HeaderType_CONFIG

Types

type CustomBlock

type CustomBlock struct {
	Txs []db.Tx
}

CustomBlock stores slice of transactions (with block data)

func HandleBlock

func HandleBlock(block *fabcommon.Block) (*CustomBlock, error)

GetBlock gets information about specified block with blocknum number

type LedgerClient

type LedgerClient interface {
	QueryBlock(blockNumber uint64, options ...ledger.RequestOption) (*fabcommon.Block, error)
}

LedgerClient interface used for dependency injection of Fabric ledger client

Jump to

Keyboard shortcuts

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