gs

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenesisChunkSize = 1024 * 10
)
View Source
const (
	GenesisFileName = "genesis.json"
)

Variables

This section is empty.

Functions

func New

func New(data []byte) (module.GenesisStorage, error)

func NewDatabaseWithStorage

func NewDatabaseWithStorage(s module.GenesisStorage) db.Database

func NewDatabaseWithWriter

func NewDatabaseWithWriter(w module.GenesisStorageWriter) db.Database

func NewFromFile

func NewFromFile(fd *os.File) (module.GenesisStorage, error)

func NewFromTx

func NewFromTx(tx []byte) module.GenesisStorage

func NewGenesisStorageWriter

func NewGenesisStorageWriter(w io.Writer) module.GenesisStorageWriter

func WriteFromPath

func WriteFromPath(w io.Writer, p string) error

WriteGenesisStorageFromPath write genesis data from the template. You may specify directory containing genesis.json. Or specify template file itself.

Types

type PrunedGenesis

type PrunedGenesis struct {
	CID    common.HexInt32 `json:"cid"`
	NID    common.HexInt32 `json:"nid"`
	Height common.HexInt64 `json:"height"`
	Block  common.HexBytes `json:"block"`
	Votes  common.HexBytes `json:"votes"`
}

func NewPrunedGenesis added in v1.2.11

func NewPrunedGenesis(js []byte) (*PrunedGenesis, error)

func (*PrunedGenesis) Verify

func (g *PrunedGenesis) Verify() error

Jump to

Keyboard shortcuts

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