core

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChasingModDiff    = 2
	CoinWorkerTimeout = time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Address string    `json:"address"`
	Balance []Balance `json:"balance"`
	Nonce   string    `json:"nonce"`
}

type AppState

type AppState struct {
	StartHeight  string      `json:"start_height"`
	Validators   []Validator `json:"validators"`
	Candidates   []Candidate `json:"candidates"`
	Accounts     []Account   `json:"accounts"`
	Coins        []Coin      `json:"coins"`
	UsedChecks   []string    `json:"used_checks"`
	MaxGas       string      `json:"max_gas"`
	TotalSlashed string      `json:"total_slashed"`
}

type Balance

type Balance struct {
	Coin  string `json:"coin"`
	Value string `json:"value"`
}

type Candidate

type Candidate struct {
	RewardAddress  string  `json:"reward_address"`
	OwnerAddress   string  `json:"owner_address"`
	TotalNoahStake string  `json:"total_noah_stake"`
	PubKey         string  `json:"pub_key"`
	Commission     string  `json:"commission"`
	Stakes         []Stake `json:"stakes"`
	CreatedAtBlock string  `json:"created_at_block"`
	Status         int     `json:"status"`
}

type Coin

type Coin struct {
	Name           string `json:"name"`
	Symbol         string `json:"symbol"`
	Volume         string `json:"volume"`
	Crr            string `json:"crr"`
	ReserveBalance string `json:"reserve_balance"`
}

type CustomTransaction added in v0.2.4

type CustomTransaction struct {
	TrxID       uint64
	OwnerAddrID uint64
	Symbol      string
}

type Extender

type Extender struct {
	// contains filtered or unexported fields
}

func NewExtender

func NewExtender(env *models.ExtenderEnvironment, db *pg.DB, dbBadger *badger.DB, ns stan.Conn, nodeApi *noah_node_go_api.NoahNodeApi) *Extender

func (*Extender) Close added in v0.2.4

func (ext *Extender) Close()

func (*Extender) FixBrokenCoinMetaInfo added in v0.2.4

func (ext *Extender) FixBrokenCoinMetaInfo()

func (*Extender) Run

func (ext *Extender) Run()

type Genesis

type Genesis struct {
	GenesisTime     time.Time `json:"genesis_time"`
	ChainID         string    `json:"chain_id"`
	ConsensusParams struct {
		Block struct {
			MaxBytes   string `json:"max_bytes"`
			MaxGas     string `json:"max_gas"`
			TimeIotaMs string `json:"time_iota_ms"`
		} `json:"block"`
		Evidence struct {
			MaxAge string `json:"max_age"`
		} `json:"evidence"`
		Validator struct {
			PubKeyTypes []string `json:"pub_key_types"`
		} `json:"validator"`
	} `json:"consensus_params"`
	AppHash  string   `json:"app_hash"`
	AppState AppState `json:"app_state"`
}

type GenesisResponse

type GenesisResponse struct {
	Jsonrpc string `json:"jsonrpc"`
	Id      string `json:"id"`
	Result  struct {
		Genesis Genesis `json:"genesis"`
	} `json:"result"`
}

type Stake

type Stake struct {
	Owner     string `json:"owner"`
	Coin      string `json:"coin"`
	Value     string `json:"value"`
	NoahValue string `json:"noah_value"`
}

type Validator

type Validator struct {
	RewardAddress  string `json:"reward_address"`
	TotalNoahStake string `json:"total_noah_stake"`
	PubKey         string `json:"pub_key"`
	Commission     string `json:"commission"`
	AccumReward    string `json:"accum_reward"`
	AbsentTimes    string `json:"absent_times"`
}

Jump to

Keyboard shortcuts

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