Documentation
¶
Index ¶
- Constants
- type Account
- type AccountStoreData
- type Client
- type MinerPool
- func (p *MinerPool) Excavate(inputBlock interfaces.Block, outputBlockCh chan interfaces.Block)
- func (p *MinerPool) GetCurrentAddressCount() int
- func (p *MinerPool) GetCurrentMiningAccounts() map[string]*Account
- func (p *MinerPool) GetCurrentRealtimePeriod() *RealtimePeriod
- func (p *MinerPool) GetCurrentTcpConnectingCount() int
- func (p *MinerPool) SetBlockChain(blockchain interfaces.BlockChain)
- func (p *MinerPool) SetTxPool(tp interfaces.TxPool)
- func (p *MinerPool) Start() error
- func (p *MinerPool) StopMining()
- type MinerPoolConfig
- type MinerPoolStatus
- type RealtimePeriod
- type SettlementPeriod
- type WorkItem
Constants ¶
View Source
const (
MinerPoolStatusSize = 4 * 12
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func NewAccountByPeriod ¶
func NewAccountByPeriod(address fields.Address, period *RealtimePeriod) *Account
func (*Account) CopyByPeriod ¶
func (a *Account) CopyByPeriod(period *RealtimePeriod) *Account
func (*Account) GetAddress ¶
func (*Account) GetClientCount ¶
func (*Account) GetRealtimePowWorth ¶
func (*Account) GetStoreData ¶
func (a *Account) GetStoreData() *AccountStoreData
type AccountStoreData ¶
type AccountStoreData struct {
// contains filtered or unexported fields
}
func NewEmptyAccountStoreData ¶
func NewEmptyAccountStoreData(curhei uint64) *AccountStoreData
func (*AccountStoreData) GetFinds ¶
func (s *AccountStoreData) GetFinds() (int, int)
func (*AccountStoreData) GetRewards ¶
func (s *AccountStoreData) GetRewards() (int64, int64, int64)
func (*AccountStoreData) Parse ¶
func (s *AccountStoreData) Parse(buf []byte, seek uint32) (uint32, error)
func (*AccountStoreData) Serialize ¶
func (s *AccountStoreData) Serialize() ([]byte, error)
func (*AccountStoreData) Size ¶
func (s *AccountStoreData) Size() uint32
type MinerPool ¶
type MinerPool struct { Config *MinerPoolConfig // contains filtered or unexported fields }
func NewMinerPool ¶
func NewMinerPool(cnf *MinerPoolConfig) *MinerPool
func (*MinerPool) Excavate ¶
func (p *MinerPool) Excavate(inputBlock interfaces.Block, outputBlockCh chan interfaces.Block)
func (*MinerPool) GetCurrentAddressCount ¶
func (*MinerPool) GetCurrentMiningAccounts ¶
func (*MinerPool) GetCurrentRealtimePeriod ¶
func (p *MinerPool) GetCurrentRealtimePeriod() *RealtimePeriod
func (*MinerPool) GetCurrentTcpConnectingCount ¶
func (*MinerPool) SetBlockChain ¶
func (p *MinerPool) SetBlockChain(blockchain interfaces.BlockChain)
func (*MinerPool) SetTxPool ¶
func (p *MinerPool) SetTxPool(tp interfaces.TxPool)
type MinerPoolConfig ¶
type MinerPoolConfig struct { Datadir string TcpListenPort int TcpConnectMaxSize uint FeePercentage float64 RewardAccount *account.Account /////////////////////////////// DelayedConfirmRewardHeight int DoTransferRewardPeriodHeight int }
func NewEmptyMinerPoolConfig ¶
func NewEmptyMinerPoolConfig() *MinerPoolConfig
func NewMinerPoolConfig ¶
func NewMinerPoolConfig(cnffile *sys.Inicnf) *MinerPoolConfig
type MinerPoolStatus ¶
type MinerPoolStatus struct { FindBlockHashHeightTableLastestNumber fields.VarUint4 // Latest value of excavated block ID table TransferHashTableLastestNumber fields.VarUint4 // Latest value of transfer serial number table }
func NewEmptyMinerPoolStatus ¶
func NewEmptyMinerPoolStatus() *MinerPoolStatus
func (*MinerPoolStatus) Parse ¶
func (s *MinerPoolStatus) Parse(buf []byte, seek uint32) (uint32, error)
func (*MinerPoolStatus) Serialize ¶
func (s *MinerPoolStatus) Serialize() ([]byte, error)
func (*MinerPoolStatus) Size ¶
func (s *MinerPoolStatus) Size() uint32
type RealtimePeriod ¶
type RealtimePeriod struct {
// contains filtered or unexported fields
}
func NewRealtimePeriod ¶
func NewRealtimePeriod(minerpool *MinerPool, block interfaces.Block) *RealtimePeriod
func (*RealtimePeriod) GetAccounts ¶
func (r *RealtimePeriod) GetAccounts() []*Account
func (*RealtimePeriod) IsOverEndBlock ¶
func (r *RealtimePeriod) IsOverEndBlock(blkheibts []byte) bool
type SettlementPeriod ¶
type SettlementPeriod struct {
// contains filtered or unexported fields
}
type WorkItem ¶
type WorkItem struct {
// contains filtered or unexported fields
}
func NewWorkItem ¶
func NewWorkItem(cli *Client, blk interfaces.Block, num uint32) *WorkItem
Click to show internal directories.
Click to hide internal directories.