mockchpeer

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name string, mspID string, channelID string, blockHeight uint64, chHeights ...ChannelHeight) api.ChannelPeer

New returns a new mock ChannelPeer

Types

type ChannelHeight

type ChannelHeight struct {
	ChannelID string
	Height    uint64
}

ChannelHeight specifies the block height for a channel

type MockChannelPeer

type MockChannelPeer struct {
	sdkApi.Peer
	// contains filtered or unexported fields
}

MockChannelPeer implements ChannelPeer

func (*MockChannelPeer) BlockHeight

func (p *MockChannelPeer) BlockHeight() uint64

BlockHeight returns the block height of the peer in the channel

func (*MockChannelPeer) ChannelID

func (p *MockChannelPeer) ChannelID() string

ChannelID returns the channel ID of the ChannelPeer

func (*MockChannelPeer) GetBlockHeight

func (p *MockChannelPeer) GetBlockHeight(channelID string) uint64

GetBlockHeight returns the block height of the peer in the specified channel

func (*MockChannelPeer) String

func (p *MockChannelPeer) String() string

String returns the string representation of the ChannelPeer

Jump to

Keyboard shortcuts

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