Documentation ¶
Overview ¶
This package is only intended to be used for testing core TIBC. In order to maintain secure testing, we need to do message passing and execution which requires connecting an TIBC application module that fulfills all the callbacks. We cannot connect to tibc-transfer which does not support all channel types so instead we create a mock application module which does nothing. It simply return nil in all cases so no error ever occurs. It is intended to be as minimal and lightweight as possible and should never import simapp.
Index ¶
- Constants
- Variables
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) OnAcknowledgementPacket(sdk.Context, packettypes.Packet, []byte) (*sdk.Result, error)
- func (am AppModule) OnRecvPacket(sdk.Context, packettypes.Packet) (*sdk.Result, []byte, error)
- func (am AppModule) OnTimeoutPacket(sdk.Context, packettypes.Packet) (*sdk.Result, error)
- func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(module.Configurator)
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino)
- func (AppModuleBasic) ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage) error
- type PV
Constants ¶
const (
ModuleName = tibchost.ModuleName + "mock"
)
Variables ¶
var ( MockAcknowledgement = []byte("mock acknowledgement") MockCommitment = []byte("mock packet commitment") )
Functions ¶
This section is empty.
Types ¶
type AppModule ¶
type AppModule struct {
AppModuleBasic
}
AppModule represents the AppModule for the mock module.
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
BeginBlock implements the AppModule interface
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock implements the AppModule interface
func (AppModule) ExportGenesis ¶
ExportGenesis implements the AppModule interface.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis( ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage, ) []abci.ValidatorUpdate
InitGenesis implements the AppModule interface.
func (AppModule) OnAcknowledgementPacket ¶
func (am AppModule) OnAcknowledgementPacket( sdk.Context, packettypes.Packet, []byte, ) (*sdk.Result, error)
OnAcknowledgementPacket implements the TIBCModule interface.
func (AppModule) OnRecvPacket ¶
OnRecvPacket implements the TIBCModule interface.
func (AppModule) OnTimeoutPacket ¶
OnTimeoutPacket implements the TIBCModule interface.
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants implements the AppModule interface.
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(module.Configurator)
RegisterServices implements the AppModule interface.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic is the mock AppModuleBasic.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis implements AppModuleBasic interface.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd implements AppModuleBasic interface.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd implements AppModuleBasic interface.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name implements AppModuleBasic interface.
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
RegisterGRPCGatewayRoutes implements AppModuleBasic interface.
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces implements AppModuleBasic interface.
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino)
RegisterLegacyAminoCodec implements AppModuleBasic interface.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis( codec.JSONCodec, client.TxEncodingConfig, json.RawMessage, ) error
ValidateGenesis implements the AppModuleBasic interface.
type PV ¶
type PV struct {
PrivKey cryptotypes.PrivKey
}
MockPV implements PrivValidator without any safety or persistence. Only use it for testing.
func (PV) SignProposal ¶
SignProposal implements PrivValidator interface