Documentation ¶
Index ¶
- type P2PoolApi
- func (p *P2PoolApi) ByMainHeight(height uint64) sidechain.UniquePoolBlockSlice
- func (p *P2PoolApi) ByMainId(id types.Hash) *sidechain.PoolBlock
- func (p *P2PoolApi) ByMainIdWithHint(id, templateIdHint types.Hash) *sidechain.PoolBlock
- func (p *P2PoolApi) BySideHeight(height uint64) sidechain.UniquePoolBlockSlice
- func (p *P2PoolApi) ByTemplateId(id types.Hash) *sidechain.PoolBlock
- func (p *P2PoolApi) ConnectionCheck(addrPort netip.AddrPort) *P2PoolConnectionCheckInformation[*sidechain.PoolBlock]
- func (p *P2PoolApi) Consensus() *sidechain.Consensus
- func (p *P2PoolApi) DifficultyByHeight(height uint64) types.Difficulty
- func (p *P2PoolApi) InsertAlternate(b *sidechain.PoolBlock)
- func (p *P2PoolApi) LightByMainHeight(height uint64) sidechain.UniquePoolBlockSlice
- func (p *P2PoolApi) LightByMainId(id types.Hash) *sidechain.PoolBlock
- func (p *P2PoolApi) LightByMainIdWithHint(id, templateIdHint types.Hash) *sidechain.PoolBlock
- func (p *P2PoolApi) LightBySideHeight(height uint64) sidechain.UniquePoolBlockSlice
- func (p *P2PoolApi) LightByTemplateId(id types.Hash) sidechain.UniquePoolBlockSlice
- func (p *P2PoolApi) MainDifficultyByHeight(height uint64) types.Difficulty
- func (p *P2PoolApi) MainHeaderByHeight(height uint64) *block.Header
- func (p *P2PoolApi) MainHeaderById(id types.Hash) *block.Header
- func (p *P2PoolApi) MainTip() *block.Header
- func (p *P2PoolApi) MinerData() *p2pooltypes.MinerData
- func (p *P2PoolApi) PeerList() []byte
- func (p *P2PoolApi) SeedByHeight(height uint64) types.Hash
- func (p *P2PoolApi) StateFromTemplateId(id types.Hash) (chain, uncles sidechain.UniquePoolBlockSlice)
- func (p *P2PoolApi) StateFromTip() (chain, uncles sidechain.UniquePoolBlockSlice)
- func (p *P2PoolApi) Status() *P2PoolSideChainStatusResult
- func (p *P2PoolApi) Tip() *sidechain.PoolBlock
- func (p *P2PoolApi) WaitSync() (err error)
- func (p *P2PoolApi) WaitSyncStart() (err error)
- func (p *P2PoolApi) WindowFromTemplateId(id types.Hash) (chain, uncles sidechain.UniquePoolBlockSlice)
- type P2PoolBinaryBlockResult
- type P2PoolConnectionCheckInformation
- type P2PoolServerPeerResult
- type P2PoolServerStatusResult
- type P2PoolSideChainStateResult
- type P2PoolSideChainStatusResult
- type P2PoolSpecialBinaryBlockResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P2PoolApi ¶
func NewP2PoolApi ¶
func (*P2PoolApi) ByMainHeight ¶
func (p *P2PoolApi) ByMainHeight(height uint64) sidechain.UniquePoolBlockSlice
func (*P2PoolApi) ByMainIdWithHint ¶
func (*P2PoolApi) BySideHeight ¶
func (p *P2PoolApi) BySideHeight(height uint64) sidechain.UniquePoolBlockSlice
func (*P2PoolApi) ByTemplateId ¶
func (*P2PoolApi) ConnectionCheck ¶
func (*P2PoolApi) DifficultyByHeight ¶
func (p *P2PoolApi) DifficultyByHeight(height uint64) types.Difficulty
func (*P2PoolApi) InsertAlternate ¶
func (*P2PoolApi) LightByMainHeight ¶
func (p *P2PoolApi) LightByMainHeight(height uint64) sidechain.UniquePoolBlockSlice
func (*P2PoolApi) LightByMainId ¶
func (*P2PoolApi) LightByMainIdWithHint ¶
func (*P2PoolApi) LightBySideHeight ¶
func (p *P2PoolApi) LightBySideHeight(height uint64) sidechain.UniquePoolBlockSlice
func (*P2PoolApi) LightByTemplateId ¶
func (p *P2PoolApi) LightByTemplateId(id types.Hash) sidechain.UniquePoolBlockSlice
func (*P2PoolApi) MainDifficultyByHeight ¶
func (p *P2PoolApi) MainDifficultyByHeight(height uint64) types.Difficulty
func (*P2PoolApi) MainHeaderByHeight ¶
func (*P2PoolApi) MinerData ¶
func (p *P2PoolApi) MinerData() *p2pooltypes.MinerData
func (*P2PoolApi) StateFromTemplateId ¶
func (p *P2PoolApi) StateFromTemplateId(id types.Hash) (chain, uncles sidechain.UniquePoolBlockSlice)
func (*P2PoolApi) StateFromTip ¶
func (p *P2PoolApi) StateFromTip() (chain, uncles sidechain.UniquePoolBlockSlice)
func (*P2PoolApi) Status ¶
func (p *P2PoolApi) Status() *P2PoolSideChainStatusResult
func (*P2PoolApi) WaitSyncStart ¶
func (*P2PoolApi) WindowFromTemplateId ¶
func (p *P2PoolApi) WindowFromTemplateId(id types.Hash) (chain, uncles sidechain.UniquePoolBlockSlice)
type P2PoolBinaryBlockResult ¶
type P2PoolConnectionCheckInformation ¶
type P2PoolConnectionCheckInformation[TipType any] struct { Address string `json:"address"` Port uint16 `json:"port"` ListenPort uint16 `json:"listen_port"` PeerId uint64 `json:"peer_id"` SoftwareId string `json:"software_id"` SoftwareVersion string `json:"software_version"` ProtocolVersion string `json:"protocol_version"` ConnectionTime uint64 `json:"connection_time"` Latency uint64 `json:"latency"` LastActive uint64 `json:"last_active"` Incoming bool `json:"incoming"` BroadcastTime uint64 `json:"broadcast_time"` BroadcastHeight uint64 `json:"broadcast_height"` // Tip is a sidechain.PoolBlock Tip TipType `json:"tip,omitempty"` Closed bool `json:"closed"` AlreadyConnected bool `json:"already_connected"` HandshakeComplete bool `json:"handshake_complete"` Banned bool `json:"banned"` Error string `json:"error,omitempty"` BanError string `json:"ban_error,omitempty"` }
type P2PoolServerPeerResult ¶
type P2PoolServerPeerResult struct { PeerId uint64 `json:"peer_id"` Incoming bool `json:"incoming"` Address string `json:"address"` SoftwareId string `json:"software_id"` SoftwareVersion string `json:"software_version"` ProtocolVersion string `json:"protocol_version"` ConnectionTime uint64 `json:"connection_time"` ListenPort uint32 `json:"listen_port"` Latency uint64 `json:"latency"` }
type P2PoolSideChainStateResult ¶
type P2PoolSideChainStateResult struct { TipHeight uint64 `json:"tip_height"` TipId types.Hash `json:"tip_id"` Chain []P2PoolBinaryBlockResult `json:"chain"` Uncles []P2PoolBinaryBlockResult `json:"uncles"` }
type P2PoolSideChainStatusResult ¶
type P2PoolSideChainStatusResult struct { Synchronized bool `json:"synchronized"` Height uint64 `json:"tip_height"` Id types.Hash `json:"tip_id"` Difficulty types.Difficulty `json:"difficulty"` CumulativeDifficulty types.Difficulty `json:"cumulative_difficulty"` Blocks int `json:"blocks"` }
Click to show internal directories.
Click to hide internal directories.