Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FeaturePeerInformationReceive Backwards compatible, can be sent to all clients FeaturePeerInformationReceive = ProtocolFeature(iota) FeaturePeerInformationExchange FeaturePrunedBroadcast FeatureCompactBroadcast FeatureBlockNotify )
View Source
const CurrentSoftwareId = SoftwareIdGoObserver
View Source
const CurrentSoftwareVersionMajor = 3 & 0xFFFF
View Source
const CurrentSoftwareVersionMinor = 11 & 0xFFFF
View Source
const CurrentSoftwareVersionPatch = 2 & 0xFFFF
View Source
const SemanticVersionNone = 0
View Source
const SupportedProtocolVersion = ProtocolVersion_1_2
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuxiliaryChainData ¶ added in v3.4.0
type MinerData ¶
type MinerData struct { MajorVersion uint8 `json:"major_version"` Height uint64 `json:"height"` PrevId types.Hash `json:"prev_id"` SeedHash types.Hash `json:"seed_hash"` Difficulty types.Difficulty `json:"difficulty"` MedianWeight uint64 `json:"median_weight"` AlreadyGeneratedCoins uint64 `json:"already_generated_coins"` MedianTimestamp uint64 `json:"median_timestamp"` TxBacklog mempool.Mempool `json:"tx_backlog"` TimeReceived time.Time `json:"time_received"` AuxiliaryChains []AuxiliaryChainData `json:"aux_chains,omitempty"` AuxiliaryNonce uint32 `json:"aux_nonce,omitempty"` }
type PeerVersionInformation ¶
type PeerVersionInformation struct { Protocol ProtocolVersion SoftwareVersion SoftwareVersion SoftwareId SoftwareId }
func (*PeerVersionInformation) String ¶
func (i *PeerVersionInformation) String() string
func (*PeerVersionInformation) SupportsFeature ¶
func (i *PeerVersionInformation) SupportsFeature(feature ProtocolFeature) bool
func (*PeerVersionInformation) ToAddrPort ¶
func (i *PeerVersionInformation) ToAddrPort() netip.AddrPort
type ProtocolFeature ¶
type ProtocolFeature int
ProtocolFeature List of features to check to not depend on hardcoded protocol versions. Use PeerVersionInformation.SupportsFeature() to query these.
type ProtocolVersion ¶
type ProtocolVersion SemanticVersion
const ( ProtocolVersion_0_0 ProtocolVersion = (0 << 16) | 0 ProtocolVersion_1_0 ProtocolVersion = (1 << 16) | 0 ProtocolVersion_1_1 ProtocolVersion = (1 << 16) | 1 ProtocolVersion_1_2 ProtocolVersion = (1 << 16) | 2 )
func (ProtocolVersion) Major ¶
func (v ProtocolVersion) Major() uint16
func (ProtocolVersion) Minor ¶
func (v ProtocolVersion) Minor() uint16
func (ProtocolVersion) String ¶
func (v ProtocolVersion) String() string
type SemanticVersion ¶
type SemanticVersion uint32
func SemanticVersionFromString ¶
func SemanticVersionFromString(version string) SemanticVersion
func (SemanticVersion) Major ¶
func (v SemanticVersion) Major() uint16
func (SemanticVersion) Minor ¶
func (v SemanticVersion) Minor() uint16
func (SemanticVersion) MinorPatch ¶ added in v3.11.0
func (v SemanticVersion) MinorPatch() uint16
func (SemanticVersion) Patch ¶ added in v3.11.0
func (v SemanticVersion) Patch() uint16
func (SemanticVersion) String ¶
func (v SemanticVersion) String() string
type SoftwareId ¶
type SoftwareId uint32
const ( SoftwareIdP2Pool SoftwareId = 0x00000000 SoftwareIdGoObserver SoftwareId = 0x624F6F47 //GoOb, little endian )
func (SoftwareId) String ¶
func (c SoftwareId) String() string
type SoftwareVersion ¶
type SoftwareVersion SemanticVersion
const CurrentSoftwareVersion SoftwareVersion = (CurrentSoftwareVersionMajor << 16) | (CurrentSoftwareVersionMinor << 8) | CurrentSoftwareVersionPatch
func (SoftwareVersion) Major ¶
func (v SoftwareVersion) Major() uint16
func (SoftwareVersion) Minor ¶
func (v SoftwareVersion) Minor() uint16
func (SoftwareVersion) MinorPatch ¶ added in v3.11.0
func (v SoftwareVersion) MinorPatch() uint16
func (SoftwareVersion) Patch ¶ added in v3.11.0
func (v SoftwareVersion) Patch() uint16
func (SoftwareVersion) SoftwareAwareString ¶ added in v3.11.0
func (v SoftwareVersion) SoftwareAwareString(id SoftwareId) string
func (SoftwareVersion) String ¶
func (v SoftwareVersion) String() string
Click to show internal directories.
Click to hide internal directories.