Documentation ¶
Index ¶
- 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 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) RemoveListener ¶
func (mc *MockClient) RemoveListener(listenerID string)
RemoveListener ...
func (*MockClient) RemoveListenerForEvent ¶
func (mc *MockClient) RemoveListenerForEvent(event string, listenerID string)
RemoveListenerForEvent ...
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
Click to show internal directories.
Click to hide internal directories.