ledger

package
v0.0.0-...-9b7ba46 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ledger

type Ledger interface {
	CommitNotificationsChannel(done <-chan struct{}) (<-chan *peerledger.CommitNotification, error)
	GetBlockByTxID(txID string) (*common.Block, error)
	GetBlockchainInfo() (*common.BlockchainInfo, error)
	GetBlocksIterator(startBlockNumber uint64) (ledger.ResultsIterator, error)
	GetTxValidationCodeByTxID(txID string) (peerproto.TxValidationCode, uint64, error)
}

Ledger presents a subset of the PeerLedger used by the gateway packages to aid mocking.

type PeerAdapter

type PeerAdapter struct {
	Peer *peer.Peer
}

PeerAdapter presents a peer as a LedgerProvider to aid mocking.

func (*PeerAdapter) Ledger

func (adapter *PeerAdapter) Ledger(channelName string) (Ledger, error)

type Provider

type Provider interface {
	Ledger(channelName string) (Ledger, error)
}

Provider presents a small piece of the Peer in a form that can be easily used (and mocked) by gateway implementation.

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