Documentation ¶
Index ¶
- type ClientMock
- func (_m *ClientMock) Call(p *types.CallParam, r interface{}) error
- func (_m *ClientMock) CloseAllMonitor()
- func (_m *ClientMock) CloseMonitor(conn *websocket.Conn)
- func (_m *ClientMock) GetBalance(param *types.AddressParam) (*big.Int, error)
- func (_m *ClientMock) GetBlockByHeight(p *types.BlockHeightParam) (*types.Block, error)
- func (_m *ClientMock) GetBlockHeaderByHeight(height int64) (*types.BlockHeader, error)
- func (_m *ClientMock) GetBlockHeaderBytesByHeight(p *types.BlockHeightParam) ([]byte, error)
- func (_m *ClientMock) GetCommitVoteListByHeight(height int64) (*types.CommitVoteList, error)
- func (_m *ClientMock) GetDataByHash(p *types.DataHashParam) ([]byte, error)
- func (_m *ClientMock) GetLastBlock() (*types.Block, error)
- func (_m *ClientMock) GetProofForEvents(p *types.ProofEventsParam) ([][][]byte, error)
- func (_m *ClientMock) GetProofForResult(p *types.ProofResultParam) ([][]byte, error)
- func (_m *ClientMock) GetValidatorsByHash(hash common.HexHash) ([]common.Address, error)
- func (_m *ClientMock) GetVotesByHeight(p *types.BlockHeightParam) ([]byte, error)
- func (_m *ClientMock) Monitor(ctx context.Context, reqUrl string, reqPtr interface{}, respPtr interface{}, ...) error
- func (_m *ClientMock) MonitorBlock(ctx context.Context, p *types.BlockRequest, ...) error
- func (_m *ClientMock) MonitorEvent(ctx context.Context, p *types.EventRequest, ...) error
- type VerifierMock
- func (_m *VerifierMock) Next() int64
- func (_m *VerifierMock) Update(blockHeader *types.BlockHeader, nextValidators []common.Address) error
- func (_m *VerifierMock) Validators(nextValidatorsHash common.HexBytes) []common.Address
- func (_m *VerifierMock) Verify(blockHeader *types.BlockHeader, votes []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientMock ¶
ClientMock is an autogenerated mock type for the IClient type
func NewClientMock ¶
func NewClientMock(t mockConstructorTestingTNewClientMock) *ClientMock
NewClientMock creates a new instance of ClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ClientMock) Call ¶
func (_m *ClientMock) Call(p *types.CallParam, r interface{}) error
Call provides a mock function with given fields: p, r
func (*ClientMock) CloseAllMonitor ¶
func (_m *ClientMock) CloseAllMonitor()
CloseAllMonitor provides a mock function with given fields:
func (*ClientMock) CloseMonitor ¶
func (_m *ClientMock) CloseMonitor(conn *websocket.Conn)
CloseMonitor provides a mock function with given fields: conn
func (*ClientMock) GetBalance ¶
func (_m *ClientMock) GetBalance(param *types.AddressParam) (*big.Int, error)
GetBalance provides a mock function with given fields: param
func (*ClientMock) GetBlockByHeight ¶
func (_m *ClientMock) GetBlockByHeight(p *types.BlockHeightParam) (*types.Block, error)
GetBlockByHeight provides a mock function with given fields: p
func (*ClientMock) GetBlockHeaderByHeight ¶
func (_m *ClientMock) GetBlockHeaderByHeight(height int64) (*types.BlockHeader, error)
GetBlockHeaderByHeight provides a mock function with given fields: height
func (*ClientMock) GetBlockHeaderBytesByHeight ¶
func (_m *ClientMock) GetBlockHeaderBytesByHeight(p *types.BlockHeightParam) ([]byte, error)
GetBlockHeaderBytesByHeight provides a mock function with given fields: p
func (*ClientMock) GetCommitVoteListByHeight ¶
func (_m *ClientMock) GetCommitVoteListByHeight(height int64) (*types.CommitVoteList, error)
GetCommitVoteListByHeight provides a mock function with given fields: height
func (*ClientMock) GetDataByHash ¶
func (_m *ClientMock) GetDataByHash(p *types.DataHashParam) ([]byte, error)
GetDataByHash provides a mock function with given fields: p
func (*ClientMock) GetLastBlock ¶
func (_m *ClientMock) GetLastBlock() (*types.Block, error)
GetLastBlock provides a mock function with given fields:
func (*ClientMock) GetProofForEvents ¶
func (_m *ClientMock) GetProofForEvents(p *types.ProofEventsParam) ([][][]byte, error)
GetProofForEvents provides a mock function with given fields: p
func (*ClientMock) GetProofForResult ¶
func (_m *ClientMock) GetProofForResult(p *types.ProofResultParam) ([][]byte, error)
GetProofForResult provides a mock function with given fields: p
func (*ClientMock) GetValidatorsByHash ¶
GetValidatorsByHash provides a mock function with given fields: hash
func (*ClientMock) GetVotesByHeight ¶
func (_m *ClientMock) GetVotesByHeight(p *types.BlockHeightParam) ([]byte, error)
GetVotesByHeight provides a mock function with given fields: p
func (*ClientMock) Monitor ¶
func (_m *ClientMock) Monitor(ctx context.Context, reqUrl string, reqPtr interface{}, respPtr interface{}, cb types.WsReadCallback) error
Monitor provides a mock function with given fields: ctx, reqUrl, reqPtr, respPtr, cb
func (*ClientMock) MonitorBlock ¶
func (_m *ClientMock) MonitorBlock(ctx context.Context, p *types.BlockRequest, cb func(*websocket.Conn, *types.BlockNotification) error, scb func(*websocket.Conn), errCb func(*websocket.Conn, error)) error
MonitorBlock provides a mock function with given fields: ctx, p, cb, scb, errCb
func (*ClientMock) MonitorEvent ¶
func (_m *ClientMock) MonitorEvent(ctx context.Context, p *types.EventRequest, cb func(*websocket.Conn, *types.EventNotification) error, errCb func(*websocket.Conn, error)) error
MonitorEvent provides a mock function with given fields: ctx, p, cb, errCb
type VerifierMock ¶
VerifierMock is an autogenerated mock type for the IVerifier type
func NewVerifierMock ¶
func NewVerifierMock(t mockConstructorTestingTNewVerifierMock) *VerifierMock
NewVerifierMock creates a new instance of VerifierMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*VerifierMock) Next ¶
func (_m *VerifierMock) Next() int64
Next provides a mock function with given fields:
func (*VerifierMock) Update ¶
func (_m *VerifierMock) Update(blockHeader *types.BlockHeader, nextValidators []common.Address) error
Update provides a mock function with given fields: blockHeader, nextValidators
func (*VerifierMock) Validators ¶
func (_m *VerifierMock) Validators(nextValidatorsHash common.HexBytes) []common.Address
Validators provides a mock function with given fields: nextValidatorsHash
func (*VerifierMock) Verify ¶
func (_m *VerifierMock) Verify(blockHeader *types.BlockHeader, votes []byte) (bool, error)
Verify provides a mock function with given fields: blockHeader, votes