types

package
v0.0.0-...-4ade6c6 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "reseeding"
	StoreKey   = ModuleName
	RouterKey  = ModuleName
)

Variables

View Source
var ModuleCdc *codec.Codec

ModuleCdc generic sealed codec to be used throughout this module

Functions

func GetSeedKey

func GetSeedKey(seed []byte) string

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec concrete types on codec

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

Types

type GenesisState

type GenesisState struct {
}

GenesisState is the state that must be provided at genesis.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns a default genesis state.

func NewGenesisState

func NewGenesisState() GenesisState

NewGenesisState creates a new genesis state.

type MsgSeed

type MsgSeed struct {
	Sender sdk.AccAddress
	Seed   []byte
}

MsgSeed defines a seed obtained by a participant.

func NewMsgSeed

func NewMsgSeed(sender sdk.AccAddress, seed []byte) MsgSeed

MsgSeed is a constructor function for MsgSeed.

func (MsgSeed) GetSignBytes

func (msg MsgSeed) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSeed) GetSigners

func (msg MsgSeed) GetSigners() []sdk.AccAddress

GetSigners Implements Msg.

func (MsgSeed) Route

func (msg MsgSeed) Route() string

Route Implements Msg

func (MsgSeed) Type

func (msg MsgSeed) Type() string

Type Implements Msg

func (MsgSeed) ValidateBasic

func (msg MsgSeed) ValidateBasic() error

ValidateBasic Implements Msg.

type SeedVotes

type SeedVotes map[string]struct{}

SeedVotes is a map from votes sender to an empty struct.

type Seeds

type Seeds map[string]SeedVotes

Seeds is a map from a seed to its senders.

func (Seeds) Add

func (s Seeds) Add(seed []byte, sender string)

func (Seeds) GetVotesForSeed

func (s Seeds) GetVotesForSeed(seed []byte) int

Jump to

Keyboard shortcuts

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