extra

package
v1.4.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: GPL-3.0 Imports: 10 Imported by: 12

Documentation

Overview

extra defines options for homi's extra command It supports encoding and decoding of extra data in genesis.json file

Source Files

Each file contains following contents

  • cmd.go : Defines encode and decode functions for extra data
  • decoder.go : Provides a decoder for extra data
  • encoder.go : Provides an encoder for extra data
  • flags.go : Defines command line options for extra command

Index

Constants

This section is empty.

Variables

View Source
var (
	ExtraCommand = cli.Command{
		Name:  "extra",
		Usage: "Istanbul extraData manipulation",
		Subcommands: []cli.Command{
			{
				Action:    decode,
				Name:      "decode",
				Usage:     "To decode an Istanbul extraData",
				ArgsUsage: "<extra data>",
				Flags: []cli.Flag{
					extraDataFlag,
				},
				Description: `
		This command decodes extraData to vanity and validators.
		`,
			},
			{
				Action:    encode,
				Name:      "encode",
				Usage:     "To encode an Istanbul extraData",
				ArgsUsage: "<config file> or \"0xValidator1,0xValidator2...\"",
				Flags: []cli.Flag{
					configFlag,
					validatorsFlag,
					vanityFlag,
				},
				Description: `
		This command encodes vanity and validators to extraData. Please refer to example/config.toml.
		`,
			},
		},
	}
)

Functions

func Decode

func Decode(extraData string) ([]byte, *types.IstanbulExtra, error)

func Encode

func Encode(vanity string, validators []common.Address) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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