Documentation ¶
Index ¶
- type MinerRewardStrategy
- type MockClient
- func (mc *MockClient) ABCIInfo() (*ctypes.ResultABCIInfo, error)
- func (mc *MockClient) ABCIQuery(path string, data data.Bytes, prove bool) (*ctypes.ResultABCIQuery, error)
- func (mc *MockClient) AddListenerForEvent(listenerID, event string, cb events.EventCallback)
- func (mc *MockClient) Block(height int) (*ctypes.ResultBlock, error)
- func (mc *MockClient) BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error)
- func (mc *MockClient) BroadcastTxAsync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)
- func (mc *MockClient) BroadcastTxCommit(tx ttypes.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func (mc *MockClient) BroadcastTxSync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)
- func (mc *MockClient) Commit(height int) (*ctypes.ResultCommit, error)
- func (mc *MockClient) FireEvent(event string, data events.EventData)
- func (mc *MockClient) Genesis() (*ctypes.ResultGenesis, error)
- func (mc *MockClient) IsRunning() bool
- func (mc *MockClient) OnReset() error
- func (mc *MockClient) OnStart() error
- func (mc *MockClient) OnStop()
- func (mc *MockClient) RemoveListener(listenerID string)
- func (mc *MockClient) RemoveListenerForEvent(event string, listenerID string)
- func (mc *MockClient) Reset() (bool, error)
- func (mc *MockClient) SetLogger(log.Logger)
- func (mc *MockClient) Start() (bool, error)
- func (mc *MockClient) Status() (*ctypes.ResultStatus, error)
- func (mc *MockClient) Stop() bool
- func (mc *MockClient) String() string
- func (mc *MockClient) Tx(hash []byte, prove bool) (*ctypes.ResultTx, error)
- func (mc *MockClient) Validators() (*ctypes.ResultValidators, error)
- type Strategy
- type ValidatorsStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MinerRewardStrategy ¶
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) 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) SetLogger ¶ added in v0.5.2
func (mc *MockClient) SetLogger(log.Logger)
SetLogger ...
func (*MockClient) Status ¶ added in v0.5.2
func (mc *MockClient) Status() (*ctypes.ResultStatus, error)
Status ...
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
Click to show internal directories.
Click to hide internal directories.