Documentation ¶
Overview ¶
Package ethapi implements the general Ethereum API functions.
Index ¶
- func GetSeedByVotePkr(wallets []accounts.Wallet, pkr c_type.PKr) *address.Seed
- type Backend
- type Item
- type PriorityQueue
- func (pq PriorityQueue) GetQueue() []interface{}
- func (pq PriorityQueue) GetQueueItems() []*Item
- func (pq *PriorityQueue) Init(maxSize int)
- func (pq PriorityQueue) Len() int
- func (pq *PriorityQueue) MinItem() *Item
- func (pq *PriorityQueue) Pop() *Item
- func (pq *PriorityQueue) PopItem() interface{}
- func (pq *PriorityQueue) PushItem(key, value interface{}, block uint64) (bPushed bool)
- type Voter
- func (self *Voter) AddLottery(lottery *types.Lottery)
- func (self *Voter) AddVote(vote *types.Vote)
- func (self *Voter) IsLotteryValid(lottery *types.Lottery) bool
- func (self *Voter) SelfShares(poshash common.Hash, parent common.Hash, parentNumber *big.Int) ([]voteInfo, error)
- func (self *Voter) SendLotteryEvent(lottery *types.Lottery)
- func (self *Voter) SendVoteEvent(vote *types.Vote)
- func (self *Voter) SubscribeNewLotteryEvent(ch chan<- core.NewLotteryEvent) event.Subscription
- func (self *Voter) SubscribeNewVoteEvent(ch chan<- core.NewVoteEvent) event.Subscription
- func (self *Voter) SubscribeWorkerVoteEvent(ch chan<- core.NewVoteEvent) event.Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
Backend interface provides the common API services (that are provided by both full and light clients) with access to necessary functions.
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
func (PriorityQueue) GetQueue ¶
func (pq PriorityQueue) GetQueue() []interface{}
func (PriorityQueue) GetQueueItems ¶
func (pq PriorityQueue) GetQueueItems() []*Item
func (*PriorityQueue) Init ¶
func (pq *PriorityQueue) Init(maxSize int)
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (*PriorityQueue) MinItem ¶
func (pq *PriorityQueue) MinItem() *Item
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() *Item
func (*PriorityQueue) PopItem ¶
func (pq *PriorityQueue) PopItem() interface{}
func (*PriorityQueue) PushItem ¶
func (pq *PriorityQueue) PushItem(key, value interface{}, block uint64) (bPushed bool)
type Voter ¶
type Voter struct {
// contains filtered or unexported fields
}
func NewVoter ¶
func NewVoter(chainconfig *params.ChainConfig, chain blockChain, dece Backend) *Voter
func (*Voter) AddLottery ¶
func (*Voter) SelfShares ¶
func (*Voter) SendLotteryEvent ¶
func (*Voter) SendVoteEvent ¶
func (*Voter) SubscribeNewLotteryEvent ¶
func (self *Voter) SubscribeNewLotteryEvent(ch chan<- core.NewLotteryEvent) event.Subscription
func (*Voter) SubscribeNewVoteEvent ¶
func (self *Voter) SubscribeNewVoteEvent(ch chan<- core.NewVoteEvent) event.Subscription
SubscribeNewTxsEvent registers a subscription of NewTxsEvent and starts sending event to the given channel.
func (*Voter) SubscribeWorkerVoteEvent ¶
func (self *Voter) SubscribeWorkerVoteEvent(ch chan<- core.NewVoteEvent) event.Subscription
Click to show internal directories.
Click to hide internal directories.