types

package
v0.0.0-...-0c7cc47 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "checkpoints"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName
)
View Source
const RouterKey = ModuleName // this was defined in your key.go file

Variables

View Source
var ModuleCdc = codec.New()

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

Types

type Checkpoint

type Checkpoint struct {
	Index uint32 `json:"index"`
	Data  []byte `json:"data"`
}

func NewCheckpoint

func NewCheckpoint() Checkpoint

func (Checkpoint) String

func (w Checkpoint) String() string

implement fmt.Stringer

type MsgAddCheckpoint

type MsgAddCheckpoint struct {
	SectionIndex uint32         `json:"sectionIndex"`
	SectionHead  string         `json:"sectionHead"`
	CHTRoot      string         `json:"chtRoot"`
	BloomRoot    string         `json:"bloomRoot"`
	Creator      sdk.AccAddress `json:"creator"`
}

MsgSetName defines a SetName message

func NewMsgAddCheckpoint

func NewMsgAddCheckpoint(sectionIndex uint32, sectionHead string, chtRoot string, bloomRoot string, creator sdk.AccAddress) MsgAddCheckpoint

NewMsgSetName is a constructor function for MsgSetName

func (MsgAddCheckpoint) GetSignBytes

func (msg MsgAddCheckpoint) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAddCheckpoint) GetSigners

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

GetSigners defines whose signature is required

func (MsgAddCheckpoint) Route

func (msg MsgAddCheckpoint) Route() string

Route should return the name of the module

func (MsgAddCheckpoint) Type

func (msg MsgAddCheckpoint) Type() string

Type should return the action

func (MsgAddCheckpoint) ValidateBasic

func (msg MsgAddCheckpoint) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type QueryResCheckpoint

type QueryResCheckpoint struct {
	BlockNumber uint32 `json:"blockNumber"`
	BlockHash   string `json:"blockHash"`
}

Query Result Payload for a resolve query

func (QueryResCheckpoint) String

func (r QueryResCheckpoint) String() string

implement fmt.Stringer

type QueryResLastCheckpoint

type QueryResLastCheckpoint struct {
	BlockHash string `json:"blockNumber"`
}

Query Result Payload for a resolve query

func (QueryResLastCheckpoint) String

func (r QueryResLastCheckpoint) String() string

implement fmt.Stringer

Jump to

Keyboard shortcuts

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