Documentation ¶
Index ¶
- Constants
- Variables
- type ChainReader
- type LotterySeed
- type TxCmpResult
- type TxCmpResultList
- type TxsLottery
- func (tlr *TxsLottery) AddAccountToState(state util.StateDB, account common.Address)
- func (tlr *TxsLottery) GetAccountFromState(state util.StateDB) ([]common.Address, error)
- func (tlr *TxsLottery) LotteryCalc(parentHash common.Hash, num uint64) map[common.Address]*big.Int
- func (tlr *TxsLottery) LotterySaveAccount(accounts []common.Address, vrfInfo []byte)
- func (tlr *TxsLottery) ProcessMatrixState(num uint64) bool
- func (tlr *TxsLottery) ResetAccountToState()
Constants ¶
View Source
const ( N = 6 FIRST = 1 //一等奖数目 SECOND = 0 //二等奖数目 THIRD = 0 //三等奖数目 PackageName = "彩票奖励" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ChainReader ¶
type ChainReader interface { GetBlockByNumber(number uint64) *types.Block Config() *params.ChainConfig }
type LotterySeed ¶
type TxCmpResult ¶
type TxCmpResult struct { Tx types.SelfTransaction CmpResult uint64 }
type TxCmpResultList ¶
type TxCmpResultList []TxCmpResult
A slice of Pairs that implements sort.Interface to sort by Value.
func (TxCmpResultList) Len ¶
func (p TxCmpResultList) Len() int
func (TxCmpResultList) Less ¶
func (p TxCmpResultList) Less(i, j int) bool
func (TxCmpResultList) Swap ¶
func (p TxCmpResultList) Swap(i, j int)
type TxsLottery ¶
type TxsLottery struct {
// contains filtered or unexported fields
}
func New ¶
func New(chain ChainReader, st util.StateDB, seed LotterySeed, preSt util.StateDB) *TxsLottery
func (*TxsLottery) AddAccountToState ¶
func (tlr *TxsLottery) AddAccountToState(state util.StateDB, account common.Address)
func (*TxsLottery) GetAccountFromState ¶
func (*TxsLottery) LotteryCalc ¶
func (*TxsLottery) LotterySaveAccount ¶
func (tlr *TxsLottery) LotterySaveAccount(accounts []common.Address, vrfInfo []byte)
func (*TxsLottery) ProcessMatrixState ¶
func (tlr *TxsLottery) ProcessMatrixState(num uint64) bool
func (*TxsLottery) ResetAccountToState ¶
func (tlr *TxsLottery) ResetAccountToState()
Click to show internal directories.
Click to hide internal directories.