types

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: GPL-3.0, GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	SentBroadcastTx chan struct{} // fires when we call broadcast_tx_sync
	// contains filtered or unexported fields
}

MockClient is a mock implementation of a tendermint rpc client

func NewMockClient

func NewMockClient(syncing bool) *MockClient

NewMockClient returns a pointer to a new non-syncing mock tendermint rpc client

func (*MockClient) ABCIInfo

func (mc *MockClient) ABCIInfo() (*ctypes.ResultABCIInfo, error)

ABCIInfo ...

func (*MockClient) ABCIQuery

func (mc *MockClient) ABCIQuery(path string, data data.Bytes, prove bool) (*ctypes.ResultABCIQuery, error)

ABCIQuery ...

func (*MockClient) AddListenerForEvent

func (mc *MockClient) AddListenerForEvent(listenerID, event string, cb events.EventCallback)

AddListenerForEvent ...

func (*MockClient) Block

func (mc *MockClient) Block(height int) (*ctypes.ResultBlock, error)

Block ...

func (*MockClient) BlockchainInfo

func (mc *MockClient) BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error)

BlockchainInfo ...

func (*MockClient) BroadcastTxAsync

func (mc *MockClient) BroadcastTxAsync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)

BroadcastTxAsync ...

func (*MockClient) BroadcastTxCommit

func (mc *MockClient) BroadcastTxCommit(tx ttypes.Tx) (*ctypes.ResultBroadcastTxCommit, error)

BroadcastTxCommit ...

func (*MockClient) BroadcastTxSync

func (mc *MockClient) BroadcastTxSync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)

BroadcastTxSync ...

func (*MockClient) Commit

func (mc *MockClient) Commit(height int) (*ctypes.ResultCommit, error)

Commit ...

func (*MockClient) FireEvent

func (mc *MockClient) FireEvent(event string, data events.EventData)

FireEvent ...

func (*MockClient) Genesis

func (mc *MockClient) Genesis() (*ctypes.ResultGenesis, error)

Genesis ...

func (*MockClient) IsRunning

func (mc *MockClient) IsRunning() bool

IsRunning ...

func (*MockClient) OnReset

func (mc *MockClient) OnReset() error

OnReset ...

func (*MockClient) OnStart

func (mc *MockClient) OnStart() error

OnStart ...

func (*MockClient) OnStop

func (mc *MockClient) OnStop()

OnStop ...

func (*MockClient) RemoveListener

func (mc *MockClient) RemoveListener(listenerID string)

RemoveListener ...

func (*MockClient) RemoveListenerForEvent

func (mc *MockClient) RemoveListenerForEvent(event string, listenerID string)

RemoveListenerForEvent ...

func (*MockClient) Reset

func (mc *MockClient) Reset() (bool, error)

Reset ...

func (*MockClient) SetLogger

func (mc *MockClient) SetLogger(log.Logger)

SetLogger ...

func (*MockClient) Start

func (mc *MockClient) Start() (bool, error)

Start ...

func (*MockClient) Status

func (mc *MockClient) Status() (*ctypes.ResultStatus, error)

Status ...

func (*MockClient) Stop

func (mc *MockClient) Stop() bool

Stop ...

func (*MockClient) String

func (mc *MockClient) String() string

String ...

func (*MockClient) Tx

func (mc *MockClient) Tx(hash []byte, prove bool) (*ctypes.ResultTx, error)

Tx ...

func (*MockClient) Validators

func (mc *MockClient) Validators() (*ctypes.ResultValidators, error)

Validators ...

type Strategy

type Strategy struct {
	ValidatorsStrategy
}

Strategy encompasses all available strategies

type ValidatorsStrategy

type ValidatorsStrategy interface {
	SetValidators(validators []*types.Validator)
	CollectTx(tx []byte) error
	GetCurrentValidators() []*types.Validator
	GetUpdateValidators() []*types.Validator
	CheckValidatorTx(tx []byte) (*txValidator.ValidatorTx, error)
}

ValidatorsStrategy is a validator strategy

Jump to

Keyboard shortcuts

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