waitlist

package
v1.2.1-fast-validator Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 10 Imported by: 0

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