bus

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts interface {
	AddBalance(types.Address, types.CoinID, *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) Halts added in v1.2.0

func (b *Bus) Halts() HaltBlocks

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)

func (*Bus) SetHaltBlocks added in v1.2.0

func (b *Bus) SetHaltBlocks(halts HaltBlocks)

func (*Bus) SetWaitList added in v1.2.0

func (b *Bus) SetWaitList(waitList WaitList)

func (*Bus) WaitList added in v1.2.0

func (b *Bus) WaitList() WaitList

type Candidate

type Candidate struct {
	ID             uint32
	PubKey         types.Pubkey
	RewardAddress  types.Address
	OwnerAddress   types.Address
	ControlAddress types.Address
	Commission     uint32
	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.CoinID, *big.Int, ...string)
	AddCoinVolume(types.CoinID, *big.Int)
}

type Coin

type Coin struct {
	ID      types.CoinID
	Name    string
	Crr     uint32
	Symbol  types.CoinSymbol
	Version types.CoinVersion
	Volume  *big.Int
	Reserve *big.Int
}

func (Coin) GetFullSymbol added in v1.2.0

func (m Coin) GetFullSymbol() string

type Coins

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

type FrozenFunds

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

type HaltBlocks added in v1.2.0

type HaltBlocks interface {
	AddHaltBlock(uint64, types.Pubkey)
}

type Stake

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

type WaitList added in v1.2.0

type WaitList interface {
	AddToWaitList(address types.Address, pubkey types.Pubkey, coin types.CoinID, value *big.Int)
}

Jump to

Keyboard shortcuts

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