slashing

package
v1.5.17 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StoreKey   = types.StoreKey
	RouteKey   = types.RouterKey
	ModuleName = types.ModuleName
)

Variables

View Source
var (
	NewKeeper  = k.NewKeeper
	NewQuerier = k.NewQuerier
)

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper)

BeginBlocker check for infraction evidence or downtime of validators on every begin block

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisState)

ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, stakingKeeper staking.StakingKeeper, data *types.GenesisState)

InitGenesis initialize default parameters and the keeper's address to pubkey map

func NewHandler

func NewHandler(k keeper.Keeper) sdk.Handler

NewHandler creates an sdk.Handler for all the slashing type messages

Types

type AppModule

type AppModule struct {
	AppModuleBasic

	Keeper        keeper.Keeper
	AccountKeeper types.AccountKeeper
	StakingKeeper staking.StakingKeeper
}

AppModule implements an application module for the slashing module.

func NewAppModule

func NewAppModule(cdc *codec.Codec, keeper keeper.Keeper, ak types.AccountKeeper, sk staking.StakingKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlocker

func (am AppModule) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock)

BeginBlock returns the begin blocker for the slashing module.

func (AppModule) EndBlock

EndBlock returns the end blocker for the slashing module. It returns no validator updates.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context, cdc *codec.Codec) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the slashing module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis performs genesis initialization for the slashing module. It returns no validator updates.

func (AppModule) Name

func (AppModule) Name() string

Name returns the slashing module's name.

func (AppModule) RegisterServices

func (am AppModule) RegisterServices(cfg module.Configurator)

type AppModuleBasic

type AppModuleBasic struct {
	// contains filtered or unexported fields
}

AppModuleBasic defines the basic application module used by the slashing module.

func (AppModuleBasic) DefaultGenesis

func (am AppModuleBasic) DefaultGenesis(validators []tmtypes.GenesisValidator) json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the slashing module.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the slashing module's name.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(codec *codec.Codec)

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (am AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)

func (AppModuleBasic) RegisterInterfaces

func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)

Directories

Path Synopsis
client
cli
noalias noalias DONTCOVER
noalias noalias DONTCOVER

Jump to

Keyboard shortcuts

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