waitlist

package
v1.2.1-rc6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 10 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(waitlist *WaitList) *Bus

func (*Bus) AddToWaitList

func (b *Bus) AddToWaitList(address types.Address, pubkey types.Pubkey, coin types.CoinID, value *big.Int)

type Item

type Item struct {
	CandidateId uint32
	Coin        types.CoinID
	Value       *big.Int
}

type Model

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

func (*Model) AddToList

func (m *Model) AddToList(candidateId uint32, coin types.CoinID, value *big.Int)

type RWaitList

type RWaitList interface {
	Get(address types.Address, pubkey types.Pubkey, coin types.CoinID) *Item
	GetByAddress(address types.Address) *Model
	GetByAddressAndPubKey(address types.Address, pubkey types.Pubkey) []Item
	Export(state *types.AppState)
}

type WaitList

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

func NewWaitList

func NewWaitList(stateBus *bus.Bus, iavl tree.MTree) (*WaitList, error)

func (*WaitList) AddWaitList

func (wl *WaitList) AddWaitList(address types.Address, pubkey types.Pubkey, coin types.CoinID, value *big.Int)

func (*WaitList) Commit

func (wl *WaitList) Commit() error

func (*WaitList) Delete

func (wl *WaitList) Delete(address types.Address, pubkey types.Pubkey, coin types.CoinID)

func (*WaitList) Export

func (wl *WaitList) Export(state *types.AppState)

func (*WaitList) Get

func (wl *WaitList) Get(address types.Address, pubkey types.Pubkey, coin types.CoinID) *Item

func (*WaitList) GetByAddress

func (wl *WaitList) GetByAddress(address types.Address) *Model

func (*WaitList) GetByAddressAndPubKey

func (wl *WaitList) GetByAddressAndPubKey(address types.Address, pubkey types.Pubkey) []Item

Jump to

Keyboard shortcuts

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