mainchain

package
v0.0.0-...-a039820 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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) Cleanup

func (c *MainChain) Cleanup()

func (*MainChain) DownloadBlockHeaders

func (c *MainChain) DownloadBlockHeaders(currentHeight uint64) error

func (*MainChain) GetChainMainByHash

func (c *MainChain) GetChainMainByHash(hash types.Hash) *sidechain.ChainMain

func (*MainChain) GetChainMainByHeight

func (c *MainChain) GetChainMainByHeight(height uint64) *sidechain.ChainMain

func (*MainChain) GetChainMainTip

func (c *MainChain) GetChainMainTip() *sidechain.ChainMain

func (*MainChain) GetMinerDataTip

func (c *MainChain) GetMinerDataTip() *p2pooltypes.MinerData

func (*MainChain) HandleMainBlock

func (c *MainChain) HandleMainBlock(b *mainblock.Block)

func (*MainChain) HandleMainHeader

func (c *MainChain) HandleMainHeader(mainHeader *mainblock.Header)

func (*MainChain) HandleMinerData

func (c *MainChain) HandleMinerData(minerData *p2pooltypes.MinerData)

func (*MainChain) Listen

func (c *MainChain) Listen() error

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL