bus

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts interface {
	DeleteCoin(types.Address, types.CoinSymbol)
	AddBalance(types.Address, types.CoinSymbol, *big.Int)
}

type App

type App interface {
	AddTotalSlashed(*big.Int)
}

type Bus

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

func NewBus

func NewBus() *Bus

func (*Bus) Accounts

func (b *Bus) Accounts() Accounts

func (*Bus) App

func (b *Bus) App() App

func (*Bus) Candidates

func (b *Bus) Candidates() Candidates

func (*Bus) Checker

func (b *Bus) Checker() Checker

func (*Bus) Coins

func (b *Bus) Coins() Coins

func (*Bus) Events

func (b *Bus) Events() eventsdb.IEventsDB

func (*Bus) FrozenFunds

func (b *Bus) FrozenFunds() FrozenFunds

func (*Bus) SetAccounts

func (b *Bus) SetAccounts(accounts Accounts)

func (*Bus) SetApp

func (b *Bus) SetApp(app App)

func (*Bus) SetCandidates

func (b *Bus) SetCandidates(candidates Candidates)

func (*Bus) SetChecker

func (b *Bus) SetChecker(checker Checker)

func (*Bus) SetCoins

func (b *Bus) SetCoins(coins Coins)

func (*Bus) SetEvents

func (b *Bus) SetEvents(events eventsdb.IEventsDB)

func (*Bus) SetFrozenFunds

func (b *Bus) SetFrozenFunds(frozenfunds FrozenFunds)

type Candidate

type Candidate struct {
	PubKey        types.Pubkey
	RewardAddress types.Address
	OwnerAddress  types.Address
	Commission    uint
	Status        byte
}

type Candidates

type Candidates interface {
	GetStakes(types.Pubkey) []Stake
	Punish(uint64, types.TmAddress) *big.Int
	GetCandidate(types.Pubkey) *Candidate
	SetOffline(types.Pubkey)
	GetCandidateByTendermintAddress(types.TmAddress) *Candidate
}

type Checker

type Checker interface {
	AddCoin(types.CoinSymbol, *big.Int, ...string)
	AddCoinVolume(types.CoinSymbol, *big.Int)
}

type Coin

type Coin struct {
	Name    string
	Crr     uint
	Symbol  types.CoinSymbol
	Volume  *big.Int
	Reserve *big.Int
}

type Coins

type Coins interface {
	GetCoin(types.CoinSymbol) *Coin
	SubCoinVolume(types.CoinSymbol, *big.Int)
	SubCoinReserve(types.CoinSymbol, *big.Int)
}

type FrozenFunds

type FrozenFunds interface {
	AddFrozenFund(uint64, types.Address, types.Pubkey, types.CoinSymbol, *big.Int)
}

type Stake

type Stake struct {
	Owner    types.Address
	Value    *big.Int
	Coin     types.CoinSymbol
	BipValue *big.Int
}

Jump to

Keyboard shortcuts

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