frozenfunds

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 12 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 Bus

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

func NewBus

func NewBus(frozenfunds *FrozenFunds) *Bus

func (*Bus) AddFrozenFund

func (b *Bus) AddFrozenFund(height uint64, address types.Address, pubkey types.Pubkey, candidateID uint32, coin types.CoinID, value *big.Int)

type FrozenFunds

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

func NewFrozenFunds

func NewFrozenFunds(stateBus *bus.Bus, iavl tree.MTree) (*FrozenFunds, error)

func (*FrozenFunds) AddFund

func (f *FrozenFunds) AddFund(height uint64, address types.Address, pubkey types.Pubkey, candidateId uint32, coin types.CoinID, value *big.Int)

func (*FrozenFunds) Commit

func (f *FrozenFunds) Commit() error

func (*FrozenFunds) Delete

func (f *FrozenFunds) Delete(height uint64)

func (*FrozenFunds) Export

func (f *FrozenFunds) Export(state *types.AppState, height uint64)

func (*FrozenFunds) GetFrozenFunds

func (f *FrozenFunds) GetFrozenFunds(height uint64) *Model

func (*FrozenFunds) GetOrNew

func (f *FrozenFunds) GetOrNew(height uint64) *Model

func (*FrozenFunds) PunishFrozenFundsWithID added in v1.2.0

func (f *FrozenFunds) PunishFrozenFundsWithID(fromHeight uint64, toHeight uint64, candidateID uint32)

type Item

type Item struct {
	Address      types.Address
	CandidateKey *types.Pubkey
	CandidateID  uint32
	Coin         types.CoinID
	Value        *big.Int
}

type Model

type Model struct {
	List []Item
	// contains filtered or unexported fields
}

func (*Model) Height

func (m *Model) Height() uint64

type RFrozenFunds added in v1.2.0

type RFrozenFunds interface {
	Export(state *types.AppState, height uint64)
	GetFrozenFunds(height uint64) *Model
}

Jump to

Keyboard shortcuts

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