Documentation ¶
Index ¶
- Constants
- type MainChain
- func (c *MainChain) Cleanup()
- func (c *MainChain) DownloadBlockHeaders(currentHeight uint64) error
- func (c *MainChain) GetChainMainByHash(hash types.Hash) *sidechain.ChainMain
- func (c *MainChain) GetChainMainByHeight(height uint64) *sidechain.ChainMain
- func (c *MainChain) GetChainMainTip() *sidechain.ChainMain
- func (c *MainChain) GetMinerDataTip() *p2pooltypes.MinerData
- func (c *MainChain) HandleMainBlock(b *mainblock.Block)
- func (c *MainChain) HandleMainHeader(mainHeader *mainblock.Header)
- func (c *MainChain) HandleMinerData(minerData *p2pooltypes.MinerData)
- func (c *MainChain) Listen() error
- type P2PoolInterface
Constants ¶
View Source
const BlockHeadersRequired = 720
View Source
const TimestampWindow = 60
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MainChain ¶
type MainChain struct {
// contains filtered or unexported fields
}
func NewMainChain ¶
func NewMainChain(s *sidechain.SideChain, p2pool P2PoolInterface) *MainChain
func (*MainChain) DownloadBlockHeaders ¶
func (*MainChain) GetChainMainByHash ¶
func (*MainChain) GetChainMainByHeight ¶
func (*MainChain) GetChainMainTip ¶
func (*MainChain) GetMinerDataTip ¶
func (c *MainChain) GetMinerDataTip() *p2pooltypes.MinerData
func (*MainChain) HandleMainBlock ¶
func (*MainChain) HandleMainHeader ¶
func (*MainChain) HandleMinerData ¶
func (c *MainChain) HandleMinerData(minerData *p2pooltypes.MinerData)
type P2PoolInterface ¶
type P2PoolInterface interface { ClientRPC() *client.Client ClientZMQ() *zmq.Client Context() context.Context Started() bool UpdateMainData(data *sidechain.ChainMain) UpdateMinerData(data *p2pooltypes.MinerData) UpdateMempoolData(data mempool.Mempool) UpdateBlockFound(data *sidechain.ChainMain, block *sidechain.PoolBlock) }
Click to show internal directories.
Click to hide internal directories.