types

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinerRewardStrategy

type MinerRewardStrategy interface {
	Receiver() common.Address
}

MinerRewardStrategy is a mining strategy

type MockClient added in v0.5.2

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 added in v0.5.2

func NewMockClient(syncing bool) *MockClient

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

func (*MockClient) ABCIInfo added in v0.5.2

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

ABCIInfo ...

func (*MockClient) ABCIQuery added in v0.5.2

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

ABCIQuery ...

func (*MockClient) AddListenerForEvent added in v0.5.2

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

AddListenerForEvent ...

func (*MockClient) Block added in v0.5.2

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

Block ...

func (*MockClient) BlockchainInfo added in v0.5.2

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

BlockchainInfo ...

func (*MockClient) BroadcastTxAsync added in v0.5.2

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

BroadcastTxAsync ...

func (*MockClient) BroadcastTxCommit added in v0.5.2

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

BroadcastTxCommit ...

func (*MockClient) BroadcastTxSync added in v0.5.2

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

BroadcastTxSync ...

func (*MockClient) Commit added in v0.5.2

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

Commit ...

func (*MockClient) FireEvent added in v0.5.2

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

FireEvent ...

func (*MockClient) Genesis added in v0.5.2

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

Genesis ...

func (*MockClient) IsRunning added in v0.5.2

func (mc *MockClient) IsRunning() bool

IsRunning ...

func (*MockClient) OnReset added in v0.5.2

func (mc *MockClient) OnReset() error

OnReset ...

func (*MockClient) OnStart added in v0.5.2

func (mc *MockClient) OnStart() error

OnStart ...

func (*MockClient) OnStop added in v0.5.2

func (mc *MockClient) OnStop()

OnStop ...

func (*MockClient) RemoveListener added in v0.5.2

func (mc *MockClient) RemoveListener(listenerID string)

RemoveListener ...

func (*MockClient) RemoveListenerForEvent added in v0.5.2

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

RemoveListenerForEvent ...

func (*MockClient) Reset added in v0.5.2

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

Reset ...

func (*MockClient) SetLogger added in v0.5.2

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

SetLogger ...

func (*MockClient) Start added in v0.5.2

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

Start ...

func (*MockClient) Status added in v0.5.2

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

Status ...

func (*MockClient) Stop added in v0.5.2

func (mc *MockClient) Stop() bool

Stop ...

func (*MockClient) String added in v0.5.2

func (mc *MockClient) String() string

String ...

func (*MockClient) Tx added in v0.5.2

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

Tx ...

func (*MockClient) Validators added in v0.5.2

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

Validators ...

type Strategy

type Strategy struct {
	MinerRewardStrategy
	ValidatorsStrategy
}

Strategy encompasses all available strategies

type ValidatorsStrategy

type ValidatorsStrategy interface {
	SetValidators(validators []*types.Validator)
	CollectTx(tx *ethTypes.Transaction)
	GetUpdatedValidators() []*types.Validator
}

ValidatorsStrategy is a validator strategy

Jump to

Keyboard shortcuts

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