blocks

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigBlock

func GetConfigBlock(deliverer Deliverer, channel string) (*common.Block, error)

GetConfigBlock gets the latest config block from the specified channel.

func GetGenesisBlock

func GetGenesisBlock(deliverer Deliverer, channel string) (*common.Block, error)

GetGenesisBlock gets the genesis block from the specified channel.

func GetNewestBlock

func GetNewestBlock(deliverer Deliverer, channel string) (*common.Block, error)

GetNewestBlock gets the newest block from the specified channel.

func GetSpecificBlock

func GetSpecificBlock(deliverer Deliverer, channel string, number uint64) (*common.Block, error)

GetSpecificBlock gets the specified block from the specified channel.

Types

type DeliverCallback

type DeliverCallback func(*common.Block) error

DeliverCallback is a callback function called for every block returned by Deliver.

type Deliverer

type Deliverer interface {
	MSPID() string
	Identity() *identity.Identity
	Deliver(envelope *common.Envelope, callback DeliverCallback) error
}

Deliverer can be implemented by types that can deliver one or more blocks.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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