stakeservice

package
v1.0.9-dev-review Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: GPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddJob

func AddJob(spec string, run RunFunc) *cron.Cron

Types

type Account

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

type RunFunc

type RunFunc func()

type RunJob

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

func (*RunJob) Run

func (r *RunJob) Run()

type SharesInfo

type SharesInfo struct {
	Total       uint32
	Remaining   uint32
	Missed      uint32
	Expired     uint32
	ShareIds    []common.Hash
	Profit      *big.Int `rlp:"nil"`
	TotalAmount *big.Int `rlp:"nil"`
}

type StakeService

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

func CurrentStakeService

func CurrentStakeService() *StakeService

func NewStakeService

func NewStakeService(dbpath string, bc *core.BlockChain, accountManager *accounts.Manager) *StakeService

func (*StakeService) GetBlockRecords

func (self *StakeService) GetBlockRecords(blockNumber uint64) (shares []*stake.Share, pools []*stake.StakePool)

func (*StakeService) Shares

func (self *StakeService) Shares() (shares []*stake.Share)

func (*StakeService) SharesById

func (self *StakeService) SharesById(id common.Hash) *stake.Share

func (*StakeService) SharesByPk

func (self *StakeService) SharesByPk(pk c_type.Uint512) (shares []*stake.Share)

func (*StakeService) SharesByPkr

func (self *StakeService) SharesByPkr(pkr c_type.PKr) (shares []*stake.Share)

func (*StakeService) SharesInfoByPK

func (self *StakeService) SharesInfoByPK(pk c_type.Uint512) *SharesInfo

func (*StakeService) SharesInfoByPKr

func (self *StakeService) SharesInfoByPKr(pkr c_type.PKr) *SharesInfo

func (*StakeService) SharesInfoByPk

func (self *StakeService) SharesInfoByPk(pk c_type.Uint512) (sharesInfo *SharesInfo)

func (*StakeService) SharesInfoByPkr

func (self *StakeService) SharesInfoByPkr(pkr c_type.PKr) (sharesInfo *SharesInfo)

func (*StakeService) StakePools

func (self *StakeService) StakePools() (pools []*stake.StakePool)

Jump to

Keyboard shortcuts

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