Documentation ¶
Index ¶
- Constants
- Variables
- func PrintObject(s string, obj interface{})
- type CandidatePool
- func (c *CandidatePool) Election(state *state.StateDB, parentHash common.Hash, currBlockNumber *big.Int) ([]*discover.Node, error)
- func (c *CandidatePool) GetAllWitness(state *state.StateDB, blockNumber *big.Int) ([]*discover.Node, []*discover.Node, []*discover.Node, error)
- func (c *CandidatePool) GetCandidate(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) *types.Candidate
- func (c *CandidatePool) GetCandidateArr(state vm.StateDB, blockNumber *big.Int, nodeIds ...discover.NodeID) types.CandidateQueue
- func (c *CandidatePool) GetCandidatePendArr(state vm.StateDB, flag int, blockNumber *big.Int) types.CandidateQueue
- func (c *CandidatePool) GetChairpersons(state vm.StateDB, blockNumber *big.Int) types.CandidateQueue
- func (c *CandidatePool) GetChosens(state vm.StateDB, flag int, blockNumber *big.Int) types.KindCanQueue
- func (c *CandidatePool) GetDefeat(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) types.RefundQueue
- func (c *CandidatePool) GetOwner(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) common.Address
- func (c *CandidatePool) GetRefundInterval(blockNumber *big.Int) uint32
- func (c *CandidatePool) GetWitness(state *state.StateDB, flag int, blockNumber *big.Int) ([]*discover.Node, error)
- func (c *CandidatePool) GetWitnessCandidate(state vm.StateDB, nodeId discover.NodeID, flag int, blockNumber *big.Int) *types.Candidate
- func (c *CandidatePool) IsChosens(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) bool
- func (c *CandidatePool) IsDefeat(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) bool
- func (c *CandidatePool) MaxChair() uint32
- func (c *CandidatePool) MaxCount() uint32
- func (c *CandidatePool) RefundBalance(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) error
- func (c *CandidatePool) SetCandidate(state vm.StateDB, nodeId discover.NodeID, can *types.Candidate) error
- func (c *CandidatePool) SetCandidateExtra(state vm.StateDB, nodeId discover.NodeID, extra string) error
- func (c *CandidatePool) Switch(state *state.StateDB, blockNumber *big.Int) bool
- func (c *CandidatePool) UpdateElectedQueue(state vm.StateDB, currBlockNumber *big.Int, nodeIds ...discover.NodeID) error
- func (c *CandidatePool) WithdrawCandidate(state vm.StateDB, nodeId discover.NodeID, price, blockNumber *big.Int) error
- type CandidatePoolContext
- func (c *CandidatePoolContext) Election(state *state.StateDB, parentHash common.Hash, blocknumber *big.Int) ([]*discover.Node, error)
- func (c *CandidatePoolContext) GetAllWitness(state *state.StateDB, blockNumber *big.Int) ([]*discover.Node, []*discover.Node, []*discover.Node, error)
- func (c *CandidatePoolContext) GetCandidate(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) *types.Candidate
- func (c *CandidatePoolContext) GetCandidateArr(state vm.StateDB, blockNumber *big.Int, nodeIds ...discover.NodeID) types.CandidateQueue
- func (c *CandidatePoolContext) GetCandidatePendArr(state vm.StateDB, flag int, blockNumber *big.Int) types.CandidateQueue
- func (c *CandidatePoolContext) GetChairpersons(state vm.StateDB, blockNumber *big.Int) types.CandidateQueue
- func (c *CandidatePoolContext) GetChosens(state vm.StateDB, flag int, blockNumber *big.Int) types.KindCanQueue
- func (c *CandidatePoolContext) GetDefeat(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) types.RefundQueue
- func (c *CandidatePoolContext) GetOwner(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) common.Address
- func (c *CandidatePoolContext) GetRefundInterval(blockNumber *big.Int) uint32
- func (c *CandidatePoolContext) GetWitness(state *state.StateDB, flag int, blockNumber *big.Int) ([]*discover.Node, error)
- func (c *CandidatePoolContext) GetWitnessCandidate(state vm.StateDB, nodeId discover.NodeID, flag int, blockNumber *big.Int) *types.Candidate
- func (c *CandidatePoolContext) IsChosens(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) bool
- func (c *CandidatePoolContext) IsDefeat(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) bool
- func (c *CandidatePoolContext) MaxChair() uint32
- func (c *CandidatePoolContext) MaxCount() uint32
- func (c *CandidatePoolContext) RefundBalance(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) error
- func (c *CandidatePoolContext) SetCandidate(state vm.StateDB, nodeId discover.NodeID, can *types.Candidate) error
- func (c *CandidatePoolContext) SetCandidateExtra(state vm.StateDB, nodeId discover.NodeID, extra string) error
- func (c *CandidatePoolContext) Switch(state *state.StateDB, blockNumber *big.Int) bool
- func (c *CandidatePoolContext) UpdateElectedQueue(state vm.StateDB, currBlockNumber *big.Int, nodeIds ...discover.NodeID) error
- func (c *CandidatePoolContext) WithdrawCandidate(state vm.StateDB, nodeId discover.NodeID, price, blockNumber *big.Int) error
- type ChainInfo
- type TicketPool
- func (t *TicketPool) CommitHash(stateDB vm.StateDB, blockNumber *big.Int, blockHash common.Hash) error
- func (t *TicketPool) DropReturnTicket(stateDB vm.StateDB, blockNumber *big.Int, nodeIds ...discover.NodeID) error
- func (t *TicketPool) GetBatchTicketRemaining(stateDB vm.StateDB, ticketIds []common.Hash) map[common.Hash]uint32
- func (t *TicketPool) GetCandidateEpoch(stateDB vm.StateDB, nodeId discover.NodeID) uint64
- func (t *TicketPool) GetCandidateTicketCount(stateDB vm.StateDB, nodeId discover.NodeID) uint32
- func (t *TicketPool) GetCandidateTicketIds(stateDB vm.StateDB, nodeId discover.NodeID) []common.Hash
- func (t *TicketPool) GetCandidatesTicketCount(stateDB vm.StateDB, nodeIds []discover.NodeID) map[discover.NodeID]uint32
- func (t *TicketPool) GetCandidatesTicketIds(stateDB vm.StateDB, nodeIds []discover.NodeID) map[discover.NodeID][]common.Hash
- func (t *TicketPool) GetExpireTicketIds(stateDB vm.StateDB, blockNumber *big.Int) []common.Hash
- func (t *TicketPool) GetPoolNumber(stateDB vm.StateDB) uint32
- func (t *TicketPool) GetTicket(stateDB vm.StateDB, txHash common.Hash) *types.Ticket
- func (t *TicketPool) GetTicketList(stateDB vm.StateDB, ticketIds []common.Hash) []*types.Ticket
- func (t *TicketPool) GetTicketPrice(stateDB vm.StateDB) *big.Int
- func (t *TicketPool) GetTicketRemainByTxHash(stateDB vm.StateDB, txHash common.Hash) uint32
- func (t *TicketPool) GetTicketRemaining(stateDB vm.StateDB, ticketId common.Hash) uint32
- func (t *TicketPool) Notify(stateDB vm.StateDB, blockNumber *big.Int) error
- func (t *TicketPool) ReturnTicket(stateDB vm.StateDB, nodeId discover.NodeID, ticketId common.Hash, ...) error
- func (t *TicketPool) SelectionLuckyTicket(stateDB vm.StateDB, nodeId discover.NodeID, blockHash common.Hash) (common.Hash, error)
- func (t *TicketPool) VoteTicket(stateDB vm.StateDB, owner common.Address, voteNumber uint32, deposit *big.Int, ...) (uint32, error)
- type TicketPoolContext
- func (c *TicketPoolContext) DropReturnTicket(stateDB vm.StateDB, blockNumber *big.Int, nodeIds ...discover.NodeID) error
- func (c *TicketPoolContext) GetBatchTicketRemaining(stateDB vm.StateDB, ticketIds []common.Hash) map[common.Hash]uint32
- func (c *TicketPoolContext) GetCandidateEpoch(state vm.StateDB, nodeId discover.NodeID) uint64
- func (c *TicketPoolContext) GetCandidateTicketCount(state vm.StateDB, nodeId discover.NodeID) uint32
- func (c *TicketPoolContext) GetCandidateTicketIds(state vm.StateDB, nodeId discover.NodeID) []common.Hash
- func (c *TicketPoolContext) GetCandidatesTicketCount(state vm.StateDB, nodeIds []discover.NodeID) map[discover.NodeID]uint32
- func (c *TicketPoolContext) GetCandidatesTicketIds(state vm.StateDB, nodeIds []discover.NodeID) map[discover.NodeID][]common.Hash
- func (c *TicketPoolContext) GetExpireTicketIds(state vm.StateDB, blockNumber *big.Int) []common.Hash
- func (c *TicketPoolContext) GetPoolNumber(state vm.StateDB) uint32
- func (c *TicketPoolContext) GetTicket(state vm.StateDB, ticketId common.Hash) *types.Ticket
- func (c *TicketPoolContext) GetTicketList(state vm.StateDB, ticketIds []common.Hash) []*types.Ticket
- func (c *TicketPoolContext) GetTicketPrice(state vm.StateDB) *big.Int
- func (c *TicketPoolContext) Notify(state vm.StateDB, blockNumber *big.Int) error
- func (c *TicketPoolContext) ReturnTicket(stateDB vm.StateDB, nodeId discover.NodeID, ticketId common.Hash, ...) error
- func (c *TicketPoolContext) SelectionLuckyTicket(stateDB vm.StateDB, nodeId discover.NodeID, blockHash common.Hash) (common.Hash, error)
- func (c *TicketPoolContext) SetChainConfig(chainConfig *params.ChainConfig)
- func (c *TicketPoolContext) SetChainInfo(ci ChainInfo)
- func (c *TicketPoolContext) StoreHash(state vm.StateDB, blockNumber *big.Int, blockHash common.Hash) error
- func (c *TicketPoolContext) VoteTicket(state vm.StateDB, owner common.Address, voteNumber uint32, deposit *big.Int, ...) (uint32, error)
Constants ¶
const ( GET_WITNESS = 1 GET_IM_RE = 2 GET_WIT_IM_RE = 3 )
const ( /** about candidate pool */ // immediate elected candidate ImmediatePrefix = "id" ImmediateListPrefix = "iL" // reserve elected candidate ReservePrefix = "rd" ReserveListPrefix = "rL" // previous witness PreWitnessPrefix = "Pwn" PreWitnessListPrefix = "PwL" // witness WitnessPrefix = "wn" WitnessListPrefix = "wL" // next witness NextWitnessPrefix = "Nwn" NextWitnessListPrefix = "NwL" // need refund DefeatPrefix = "df" DefeatListPrefix = "dL" /** about ticket pool */ // Remaining number key SurplusQuantity = "sq" // Expire ticket prefix ExpireTicket = "et" // candidate attach CandidateAttach = "ca" // Ticket pool hash TicketPoolHash = "tph" )
const ( PREVIOUS_C = iota - 1 CURRENT_C NEXT_C )
const ( IS_LOST = iota IS_IMMEDIATE IS_RESERVE )
Variables ¶
var ( //CandidateEncodeErr = errors.New("Candidate encoding err") //CandidateDecodeErr = errors.New("Candidate decoding err") CandidateEmptyErr = errors.New("Candidate is empty") ContractBalanceNotEnoughErr = errors.New("Contract's balance is not enough") CandidateOwnerErr = errors.New("CandidateOwner Addr is illegal") DepositLowErr = errors.New("Candidate deposit too low") WithdrawPriceErr = errors.New("Withdraw Price err") WithdrawLowErr = errors.New("Withdraw Price too low") RefundEmptyErr = errors.New("Refund is empty") )
var ( /** about candidate pool */ // immediate elected candidate ImmediateBytePrefix = []byte(ImmediatePrefix) ImmediateListBytePrefix = []byte(ImmediateListPrefix) // reserve elected candidate ReserveBytePrefix = []byte(ReservePrefix) ReserveListBytePrefix = []byte(ReserveListPrefix) // previous witness PreWitnessBytePrefix = []byte(PreWitnessPrefix) PreWitnessListBytePrefix = []byte(PreWitnessListPrefix) // witness WitnessBytePrefix = []byte(WitnessPrefix) WitnessListBytePrefix = []byte(WitnessListPrefix) // next witness NextWitnessBytePrefix = []byte(NextWitnessPrefix) NextWitnessListBytePrefix = []byte(NextWitnessListPrefix) // need refund DefeatBytePrefix = []byte(DefeatPrefix) DefeatListBytePrefix = []byte(DefeatListPrefix) /** about ticket pool */ // Remaining number key SurplusQuantityKey = []byte(SurplusQuantity) // Expire ticket prefix ExpireTicketPrefix = []byte(ExpireTicket) CandidateAttachPrefix = []byte(CandidateAttach) TicketPoolHashKey = []byte(TicketPoolHash) )
var ( TicketPoolNilErr = errors.New("Ticket Insufficient quantity") TicketPoolOverflowErr = errors.New("Number of ticket pool overflow") EncodeTicketErr = errors.New("Encode Ticket error") EncodePoolNumberErr = errors.New("Encode SurplusQuantity error") DecodeTicketErr = errors.New("Decode Ticket error") DecodePoolNumberErr = errors.New("Decode SurplusQuantity error") RecordExpireTicketErr = errors.New("Record Expire Ticket error") CandidateNotFindErr = errors.New("The Candidate not find") CandidateNilTicketErr = errors.New("This candidate has no ticket") TicketPoolBalanceErr = errors.New("TicketPool not sufficient funds") TicketNotFindErr = errors.New("The Ticket not find") HandleExpireTicketErr = errors.New("Failure to deal with expired tickets") GetCandidateAttachErr = errors.New("Get CandidateAttach error") SetCandidateAttachErr = errors.New("Update CandidateAttach error") VoteTicketErr = errors.New("Voting failed") )
Functions ¶
func PrintObject ¶
func PrintObject(s string, obj interface{})
Types ¶
type CandidatePool ¶
type CandidatePool struct {
// contains filtered or unexported fields
}
func NewCandidatePool ¶
func NewCandidatePool(configs *params.PposConfig) *CandidatePool
Initialize the global candidate pool object
func (*CandidatePool) Election ¶
func (c *CandidatePool) Election(state *state.StateDB, parentHash common.Hash, currBlockNumber *big.Int) ([]*discover.Node, error)
Announce witness
func (*CandidatePool) GetAllWitness ¶
func (c *CandidatePool) GetAllWitness(state *state.StateDB, blockNumber *big.Int) ([]*discover.Node, []*discover.Node, []*discover.Node, error)
Getting previous and current and next witnesses
func (*CandidatePool) GetCandidate ¶
func (c *CandidatePool) GetCandidate(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) *types.Candidate
Getting immediate or reserve candidate info by nodeId
func (*CandidatePool) GetCandidateArr ¶
func (c *CandidatePool) GetCandidateArr(state vm.StateDB, blockNumber *big.Int, nodeIds ...discover.NodeID) types.CandidateQueue
Getting immediate or reserve candidate info arr by nodeIds
func (*CandidatePool) GetCandidatePendArr ¶
func (c *CandidatePool) GetCandidatePendArr(state vm.StateDB, flag int, blockNumber *big.Int) types.CandidateQueue
Getting elected candidates array flag: 0: Getting all elected candidates array 1: Getting all immediate elected candidates array 2: Getting all reserve elected candidates array
func (*CandidatePool) GetChairpersons ¶
func (c *CandidatePool) GetChairpersons(state vm.StateDB, blockNumber *big.Int) types.CandidateQueue
Getting current witness array
func (*CandidatePool) GetChosens ¶
func (c *CandidatePool) GetChosens(state vm.StateDB, flag int, blockNumber *big.Int) types.KindCanQueue
Getting elected candidates array flag: 0: Getting all elected candidates array 1: Getting all immediate elected candidates array 2: Getting all reserve elected candidates array
func (*CandidatePool) GetDefeat ¶
func (c *CandidatePool) GetDefeat(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) types.RefundQueue
Getting all refund array by nodeId
func (*CandidatePool) GetOwner ¶
func (c *CandidatePool) GetOwner(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) common.Address
Getting owner's address of candidate info by nodeId
func (*CandidatePool) GetRefundInterval ¶
func (c *CandidatePool) GetRefundInterval(blockNumber *big.Int) uint32
func (*CandidatePool) GetWitness ¶
func (c *CandidatePool) GetWitness(state *state.StateDB, flag int, blockNumber *big.Int) ([]*discover.Node, error)
Getting nodes of witnesses flag: -1: the previous round of witnesses 0: the current round of witnesses 1: the next round of witnesses
func (*CandidatePool) GetWitnessCandidate ¶
func (c *CandidatePool) GetWitnessCandidate(state vm.StateDB, nodeId discover.NodeID, flag int, blockNumber *big.Int) *types.Candidate
Getting can by witnesses flag: -1: previous round 0: current round 1: next round
func (*CandidatePool) IsDefeat ¶
func (c *CandidatePool) IsDefeat(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) bool
Checked current candidate was defeat by nodeId
func (*CandidatePool) MaxChair ¶
func (c *CandidatePool) MaxChair() uint32
func (*CandidatePool) MaxCount ¶
func (c *CandidatePool) MaxCount() uint32
func (*CandidatePool) RefundBalance ¶
func (c *CandidatePool) RefundBalance(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) error
refund once
func (*CandidatePool) SetCandidate ¶
func (c *CandidatePool) SetCandidate(state vm.StateDB, nodeId discover.NodeID, can *types.Candidate) error
pledge Candidate
func (*CandidatePool) SetCandidateExtra ¶
func (c *CandidatePool) SetCandidateExtra(state vm.StateDB, nodeId discover.NodeID, extra string) error
set elected candidate extra value
func (*CandidatePool) UpdateElectedQueue ¶
func (c *CandidatePool) UpdateElectedQueue(state vm.StateDB, currBlockNumber *big.Int, nodeIds ...discover.NodeID) error
According to the nodeId to ensure the current candidate's stay
func (*CandidatePool) WithdrawCandidate ¶
func (c *CandidatePool) WithdrawCandidate(state vm.StateDB, nodeId discover.NodeID, price, blockNumber *big.Int) error
candidate withdraw from immediates or reserve elected candidates
type CandidatePoolContext ¶
type CandidatePoolContext struct {
Configs *params.PposConfig
}
func GetCandidateContextPtr ¶
func GetCandidateContextPtr() *CandidatePoolContext
func NewCandidatePoolContext ¶
func NewCandidatePoolContext(configs *params.PposConfig) *CandidatePoolContext
Initialize the global candidate pool context object
func (*CandidatePoolContext) GetAllWitness ¶
func (*CandidatePoolContext) GetCandidate ¶
func (*CandidatePoolContext) GetCandidateArr ¶
func (c *CandidatePoolContext) GetCandidateArr(state vm.StateDB, blockNumber *big.Int, nodeIds ...discover.NodeID) types.CandidateQueue
func (*CandidatePoolContext) GetCandidatePendArr ¶
func (c *CandidatePoolContext) GetCandidatePendArr(state vm.StateDB, flag int, blockNumber *big.Int) types.CandidateQueue
func (*CandidatePoolContext) GetChairpersons ¶
func (c *CandidatePoolContext) GetChairpersons(state vm.StateDB, blockNumber *big.Int) types.CandidateQueue
func (*CandidatePoolContext) GetChosens ¶
func (c *CandidatePoolContext) GetChosens(state vm.StateDB, flag int, blockNumber *big.Int) types.KindCanQueue
func (*CandidatePoolContext) GetDefeat ¶
func (c *CandidatePoolContext) GetDefeat(state vm.StateDB, nodeId discover.NodeID, blockNumber *big.Int) types.RefundQueue
func (*CandidatePoolContext) GetRefundInterval ¶
func (c *CandidatePoolContext) GetRefundInterval(blockNumber *big.Int) uint32
func (*CandidatePoolContext) GetWitness ¶
func (*CandidatePoolContext) GetWitnessCandidate ¶
func (*CandidatePoolContext) MaxChair ¶
func (c *CandidatePoolContext) MaxChair() uint32
func (*CandidatePoolContext) MaxCount ¶
func (c *CandidatePoolContext) MaxCount() uint32
func (*CandidatePoolContext) RefundBalance ¶
func (*CandidatePoolContext) SetCandidate ¶
func (*CandidatePoolContext) SetCandidateExtra ¶
func (*CandidatePoolContext) UpdateElectedQueue ¶
func (*CandidatePoolContext) WithdrawCandidate ¶
type ChainInfo ¶
type ChainInfo interface { FindTransaction(txHash common.Hash) (*types.Transaction, common.Hash, uint64, uint64) GetHeader(blockHash common.Hash, blockNumber uint64) *types.Header GetBody(blockNumber uint64) *types.Body GetNewStateDB(root common.Hash, blockNumber *big.Int, blockHash common.Hash) (*state.StateDB, error) }
type TicketPool ¶
type TicketPool struct { // Ticket price TicketPrice *big.Int // Maximum number of ticket pool MaxCount uint32 // Reach expired quantity ExpireBlockNumber uint32 // contains filtered or unexported fields }
func NewTicketPool ¶
func NewTicketPool(configs *params.PposConfig) *TicketPool
initialize the global ticket pool object
func (*TicketPool) CommitHash ¶
func (t *TicketPool) CommitHash(stateDB vm.StateDB, blockNumber *big.Int, blockHash common.Hash) error
Save the hash value of the current state of the ticket pool
func (*TicketPool) DropReturnTicket ¶
func (*TicketPool) GetBatchTicketRemaining ¶
func (t *TicketPool) GetBatchTicketRemaining(stateDB vm.StateDB, ticketIds []common.Hash) map[common.Hash]uint32
Get the batch remaining number of ticket
func (*TicketPool) GetCandidateEpoch ¶
func (*TicketPool) GetCandidateTicketCount ¶
func (*TicketPool) GetCandidateTicketIds ¶
func (*TicketPool) GetCandidatesTicketCount ¶
func (*TicketPool) GetCandidatesTicketIds ¶
func (*TicketPool) GetExpireTicketIds ¶
func (*TicketPool) GetPoolNumber ¶
func (t *TicketPool) GetPoolNumber(stateDB vm.StateDB) uint32
func (*TicketPool) GetTicketList ¶
Get ticket list
func (*TicketPool) GetTicketPrice ¶
func (t *TicketPool) GetTicketPrice(stateDB vm.StateDB) *big.Int
func (*TicketPool) GetTicketRemainByTxHash ¶
func (*TicketPool) GetTicketRemaining ¶
Get the remaining number of ticket
func (*TicketPool) ReturnTicket ¶
func (*TicketPool) SelectionLuckyTicket ¶
func (t *TicketPool) SelectionLuckyTicket(stateDB vm.StateDB, nodeId discover.NodeID, blockHash common.Hash) (common.Hash, error)
Simple version of the lucky ticket algorithm According to the previous block Hash, find the first ticket Id which is larger than the Hash. If not found, the last ticket Id is taken.
type TicketPoolContext ¶
type TicketPoolContext struct { Configs *params.PposConfig ChainInfo // contains filtered or unexported fields }
func GetTicketPoolContextPtr ¶
func GetTicketPoolContextPtr() *TicketPoolContext
func NewTicketPoolContext ¶
func NewTicketPoolContext(configs *params.PposConfig) *TicketPoolContext
Initialize the global ticket pool context object
func (*TicketPoolContext) DropReturnTicket ¶
func (*TicketPoolContext) GetBatchTicketRemaining ¶
func (*TicketPoolContext) GetCandidateEpoch ¶
func (*TicketPoolContext) GetCandidateTicketCount ¶
func (*TicketPoolContext) GetCandidateTicketIds ¶
func (*TicketPoolContext) GetCandidatesTicketCount ¶
func (*TicketPoolContext) GetCandidatesTicketIds ¶
func (*TicketPoolContext) GetExpireTicketIds ¶
func (*TicketPoolContext) GetPoolNumber ¶
func (c *TicketPoolContext) GetPoolNumber(state vm.StateDB) uint32
func (*TicketPoolContext) GetTicketList ¶
func (*TicketPoolContext) GetTicketPrice ¶
func (c *TicketPoolContext) GetTicketPrice(state vm.StateDB) *big.Int
func (*TicketPoolContext) ReturnTicket ¶
func (*TicketPoolContext) SelectionLuckyTicket ¶
func (*TicketPoolContext) SetChainConfig ¶
func (c *TicketPoolContext) SetChainConfig(chainConfig *params.ChainConfig)
func (*TicketPoolContext) SetChainInfo ¶
func (c *TicketPoolContext) SetChainInfo(ci ChainInfo)