Documentation ¶
Index ¶
- type BCSByHeight
- type Miner
- func (t *Miner) AssignRewards(address string, blockAward *big.Int) *big.Int
- func (t *Miner) CalcVoteAward(voteAward int64, ratio float64) *big.Int
- func (t *Miner) ClearThawTx(height int64, ctx xctx.XContext) error
- func (t *Miner) GenerateVoteAward(address string, remainAward *big.Int) ([]*lpb.Transaction, error)
- func (t *Miner) GetThawTx(height int64, ctx xctx.XContext) ([]*lpb.Transaction, error)
- func (t *Miner) IsExit() bool
- func (t *Miner) ProcBlock(ctx xctx.XContext, block *lpb.InternalBlock) error
- func (t *Miner) ReadTermTable(ctx xctx.XContext) (bool, error)
- func (t *Miner) Start()
- func (t *Miner) Stop()
- func (t *Miner) UpdateCacheTable(ctx xctx.XContext)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BCSByHeight ¶
type BCSByHeight []*xpb.ChainStatus
func (BCSByHeight) Len ¶
func (s BCSByHeight) Len() int
func (BCSByHeight) Less ¶
func (s BCSByHeight) Less(i, j int) bool
func (BCSByHeight) Swap ¶
func (s BCSByHeight) Swap(i, j int)
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
负责生产和同步区块
func (*Miner) AssignRewards ¶
func (*Miner) CalcVoteAward ¶
计算投票奖励
func (*Miner) GenerateVoteAward ¶
Click to show internal directories.
Click to hide internal directories.