Version: v0.1.0 Latest Latest

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

Go to latest
Published: Oct 13, 2018 License: GPL-3.0 Imports: 28 Imported by: 14




This section is empty.


View Source
var Cdc = amino.NewCodec()


func Hash

func Hash(data interface{}, excludedFields []string) []byte

func PubKeyString

func PubKeyString(pk PubKey) string


type ByAll

type ByAll []common.Address

ByAll implements sort.Interface for []common.Address. It sorts be the Address

func (ByAll) Len

func (a ByAll) Len() int

func (ByAll) Less

func (a ByAll) Less(i, j int) bool

func (ByAll) Swap

func (a ByAll) Swap(i, j int)

type CmdInfo

type CmdInfo struct {
	Name         string
	Version      string
	DownloadURLs []string
	MD5          string

CmdInfo ...

func (*CmdInfo) ReleaseName

func (c *CmdInfo) ReleaseName() string

ReleaseName get the travis release name

type Context

type Context struct {
	// contains filtered or unexported fields

func NewContext

func NewContext(chain string, height, time int64, ethappState *state.StateDB) Context

func (Context) BlockHeight

func (c Context) BlockHeight() int64

func (Context) BlockTime

func (c Context) BlockTime() int64

func (Context) ChainID

func (c Context) ChainID() string

func (Context) EthappState

func (c Context) EthappState() *state.StateDB

func (Context) FormatBlockTime

func (c Context) FormatBlockTime() string

func (Context) GetNonce

func (c Context) GetNonce() uint64

func (Context) GetSigners

func (c Context) GetSigners() []common.Address

func (Context) HasSigner

func (c Context) HasSigner(signer common.Address) bool

func (Context) Reset

func (c Context) Reset() Context

Reset should clear out all permissions, but carry on knowledge that this is a child

func (*Context) SetNonce

func (c *Context) SetNonce(nonce uint64)

func (*Context) WithSigners

func (c *Context) WithSigners(signers ...common.Address)

type GenesisDoc

type GenesisDoc struct {
	GenesisTime     time.Time              `json:"genesis_time"`
	ChainID         string                 `json:"chain_id"`
	ConsensusParams *types.ConsensusParams `json:"consensus_params,omitempty"`
	Validators      []GenesisValidator     `json:"validators"`
	AppHash         []byte                 `json:"app_hash"`
	Params          *utils.Params          `json:"params"`

GenesisDoc defines the initial conditions for a tendermint blockchain, in particular its validator set.

func GenesisDocFromFile

func GenesisDocFromFile(genDocFile string) (*GenesisDoc, error)

GenesisDocFromFile reads JSON data from a file and unmarshalls it into a GenesisDoc.

func GenesisDocFromJSON

func GenesisDocFromJSON(jsonBlob []byte) (*GenesisDoc, error)

GenesisDocFromJSON unmarshalls JSON data into a GenesisDoc.

func (*GenesisDoc) SaveAs

func (genDoc *GenesisDoc) SaveAs(file string) error

SaveAs is a utility method for saving GenensisDoc as a JSON file.

func (*GenesisDoc) ValidateAndComplete

func (genDoc *GenesisDoc) ValidateAndComplete() error

ValidateAndComplete checks that all necessary fields are present and fills in defaults for optional fields left empty

func (*GenesisDoc) ValidatorHash

func (genDoc *GenesisDoc) ValidatorHash() []byte

ValidatorHash returns the hash of the validator set contained in the GenesisDoc

type GenesisValidator

type GenesisValidator struct {
	PubKey    PubKey  `json:"pub_key"`
	Power     string  `json:"power"`
	Shares    int64   `json:"shares"`
	Name      string  `json:"name"`
	Address   string  `json:"address"`
	CompRate  sdk.Rat `json:"comp_rate"`
	MaxAmount int64   `json:"max_amount"`
	Website   string  `json:"website"`
	Location  string  `json:"location"`
	Email     string  `json:"email"`
	Profile   string  `json:profile`

GenesisValidator is an initial validator.

type Hashable

type Hashable interface {
	Hash() []byte

type Monitor

type Monitor struct {
	// contains filtered or unexported fields

Monitor ...

func NewMonitor

func NewMonitor(cmd *TravisCmd) *Monitor

NewMonitor ...

func (*Monitor) Download

func (r *Monitor) Download(info *CmdInfo, reply *MonitorResponse) error

Download ...

func (*Monitor) Kill

func (r *Monitor) Kill(info *CmdInfo, reply *MonitorResponse) error

Kill ...

func (*Monitor) Upgrade

func (r *Monitor) Upgrade(info *CmdInfo, reply *MonitorResponse) error

Upgrade ...

type MonitorResponse

type MonitorResponse struct {
	Code uint
	Msg  []byte

MonitorResponse ...

type PubKey

type PubKey struct {

func GetPubKey

func GetPubKey(pubKeyStr string) (pk PubKey, err error)

func (*PubKey) MarshalJSON

func (pk *PubKey) MarshalJSON() ([]byte, error)

func (*PubKey) UnmarshalJSON

func (pk *PubKey) UnmarshalJSON(b []byte) error

type Signable

type Signable interface {
	// SignBytes is the immutable data, which needs to be signed
	SignBytes() []byte

	// Sign will add a transaction with signature
	Sign(tx *types.Transaction) error

	// Signers will return the public key(s) that signed if the signature
	// is valid, or an error if there is any issue with the signature,
	// including if there are no signatures
	Signers() (common.Address, error)

	// TxBytes returns the transaction data as well as all signatures
	// It should return an error if Sign was never called
	TxBytes() ([]byte, error)

Signable represents any transaction we wish to send to tendermint core These methods allow us to sign arbitrary Tx with the KeyStore

type TravisCmd

type TravisCmd struct {
	Root     string
	Path     string
	Name     string
	Args     []string
	NextName string
	NextArgs []string
	// Env  []string
	DownloadChan chan *CmdInfo //
	UpgradeChan  chan *CmdInfo //
	KillChan     chan string   //
	// contains filtered or unexported fields

TravisCmd ...

func NewTravisCmd

func NewTravisCmd(root string, name string, arg ...string) *TravisCmd

NewTravisCmd create a new travis CMD

func (*TravisCmd) Cmd

func (c *TravisCmd) Cmd() *exec.Cmd

Cmd ...

func (*TravisCmd) Download

func (c *TravisCmd) Download(cmdInfo *CmdInfo) error

Download download the new version travis as specified

func (*TravisCmd) Kill

func (c *TravisCmd) Kill() error

Kill kill the travis command

func (*TravisCmd) Restart

func (c *TravisCmd) Restart() error

Restart restart the travis

func (*TravisCmd) Start

func (c *TravisCmd) Start() error

Start stop the sub travis process

func (*TravisCmd) Stop

func (c *TravisCmd) Stop() error

Stop the sub travis process

func (*TravisCmd) Upgrade

func (c *TravisCmd) Upgrade(cmdInfo *CmdInfo) error

Upgrade upgrade to new version travis

Jump to

Keyboard shortcuts

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