pool

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	POOLTYPE_name = map[int32]string{
		0: "PPLNS",
		1: "PPS",
		2: "PROP",
		3: "SOLO",
	}
	POOLTYPE_value = map[string]int32{
		"PPLNS": 0,
		"PPS":   1,
		"PROP":  2,
		"SOLO":  3,
	}
)

Enum value maps for POOLTYPE.

View Source
var (
	MESSAGETYPE_name = map[int32]string{
		0: "SHARE",
		1: "BLOCK",
		2: "INVALIDSHARE",
	}
	MESSAGETYPE_value = map[string]int32{
		"SHARE":        0,
		"BLOCK":        1,
		"INVALIDSHARE": 2,
	}
)

Enum value maps for MESSAGETYPE.

Functions

This section is empty.

Types

type BannedConfig

type BannedConfig struct {
	Address string `json:"address"`
	Proxy   bool   `json:"proxy"`
	Banned  bool   `json:"banned"`
}

type BannedPush

type BannedPush []BannedConfig

type Block

type Block struct {
	Hash       *string   `protobuf:"bytes,1,req,name=hash" json:"hash,omitempty"`
	Difficulty *int64    `protobuf:"varint,2,req,name=difficulty" json:"difficulty,omitempty"`
	Shares     *int64    `protobuf:"varint,3,req,name=shares" json:"shares,omitempty"`
	Timestamp  *int64    `protobuf:"varint,4,req,name=timestamp" json:"timestamp,omitempty"`
	PoolType   *POOLTYPE `protobuf:"varint,5,req,name=poolType,enum=support.POOLTYPE" json:"poolType,omitempty"`
	Unlocked   *bool     `protobuf:"varint,6,req,name=unlocked" json:"unlocked,omitempty"`
	Valid      *bool     `protobuf:"varint,7,req,name=valid" json:"valid,omitempty"`
	Value      *int64    `protobuf:"varint,8,opt,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetDifficulty

func (x *Block) GetDifficulty() int64

func (*Block) GetHash

func (x *Block) GetHash() string

func (*Block) GetPoolType

func (x *Block) GetPoolType() POOLTYPE

func (*Block) GetShares

func (x *Block) GetShares() int64

func (*Block) GetTimestamp

func (x *Block) GetTimestamp() int64

func (*Block) GetUnlocked

func (x *Block) GetUnlocked() bool

func (*Block) GetValid

func (x *Block) GetValid() bool

func (*Block) GetValue

func (x *Block) GetValue() int64

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type BlockTemplate

type BlockTemplate struct {
	Source            *string `protobuf:"bytes,1,req,name=source" json:"source,omitempty"`
	Difficulty        *int64  `protobuf:"varint,2,req,name=difficulty" json:"difficulty,omitempty"`
	Height            *int64  `protobuf:"varint,3,req,name=height" json:"height,omitempty"`
	ReservedOffset    *int64  `protobuf:"varint,4,req,name=reserved_offset,json=reservedOffset" json:"reserved_offset,omitempty"`
	BlocktemplateBlob *string `protobuf:"bytes,5,req,name=blocktemplate_blob,json=blocktemplateBlob" json:"blocktemplate_blob,omitempty"`
	PrevHash          *string `protobuf:"bytes,6,req,name=prev_hash,json=prevHash" json:"prev_hash,omitempty"`
	SeedHash          *string `protobuf:"bytes,7,req,name=seed_hash,json=seedHash" json:"seed_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockTemplate) Descriptor deprecated

func (*BlockTemplate) Descriptor() ([]byte, []int)

Deprecated: Use BlockTemplate.ProtoReflect.Descriptor instead.

func (*BlockTemplate) GetBlocktemplateBlob

func (x *BlockTemplate) GetBlocktemplateBlob() string

func (*BlockTemplate) GetDifficulty

func (x *BlockTemplate) GetDifficulty() int64

func (*BlockTemplate) GetHeight

func (x *BlockTemplate) GetHeight() int64

func (*BlockTemplate) GetPrevHash

func (x *BlockTemplate) GetPrevHash() string

func (*BlockTemplate) GetReservedOffset

func (x *BlockTemplate) GetReservedOffset() int64

func (*BlockTemplate) GetSeedHash

func (x *BlockTemplate) GetSeedHash() string

func (*BlockTemplate) GetSource

func (x *BlockTemplate) GetSource() string

func (*BlockTemplate) ProtoMessage

func (*BlockTemplate) ProtoMessage()

func (*BlockTemplate) ProtoReflect

func (x *BlockTemplate) ProtoReflect() protoreflect.Message

func (*BlockTemplate) Reset

func (x *BlockTemplate) Reset()

func (*BlockTemplate) String

func (x *BlockTemplate) String() string

type ConfigItem

type ConfigItem struct {
	Module    string      `json:"module"`
	Item      string      `json:"item"`
	ItemValue interface{} `json:"item_value"`
}

type ConfigPush

type ConfigPush []ConfigItem

type FoundBlock

type FoundBlock struct {
	Source     *string `protobuf:"bytes,1,req,name=source" json:"source,omitempty"`
	HashedData []byte  `protobuf:"bytes,2,req,name=hashedData" json:"hashedData,omitempty"`
	Pool       *string `protobuf:"bytes,3,req,name=pool" json:"pool,omitempty"`
	// contains filtered or unexported fields
}

func (*FoundBlock) Descriptor deprecated

func (*FoundBlock) Descriptor() ([]byte, []int)

Deprecated: Use FoundBlock.ProtoReflect.Descriptor instead.

func (*FoundBlock) GetHashedData

func (x *FoundBlock) GetHashedData() []byte

func (*FoundBlock) GetPool

func (x *FoundBlock) GetPool() string

func (*FoundBlock) GetSource

func (x *FoundBlock) GetSource() string

func (*FoundBlock) ProtoMessage

func (*FoundBlock) ProtoMessage()

func (*FoundBlock) ProtoReflect

func (x *FoundBlock) ProtoReflect() protoreflect.Message

func (*FoundBlock) Reset

func (x *FoundBlock) Reset()

func (*FoundBlock) String

func (x *FoundBlock) String() string

type InvalidShare

type InvalidShare struct {
	PaymentAddress *string `protobuf:"bytes,1,req,name=paymentAddress" json:"paymentAddress,omitempty"`
	PaymentID      *string `protobuf:"bytes,2,opt,name=paymentID" json:"paymentID,omitempty"`
	Identifier     *string `protobuf:"bytes,3,req,name=identifier" json:"identifier,omitempty"`
	// contains filtered or unexported fields
}

func (*InvalidShare) Descriptor deprecated

func (*InvalidShare) Descriptor() ([]byte, []int)

Deprecated: Use InvalidShare.ProtoReflect.Descriptor instead.

func (*InvalidShare) GetIdentifier

func (x *InvalidShare) GetIdentifier() string

func (*InvalidShare) GetPaymentAddress

func (x *InvalidShare) GetPaymentAddress() string

func (*InvalidShare) GetPaymentID

func (x *InvalidShare) GetPaymentID() string

func (*InvalidShare) ProtoMessage

func (*InvalidShare) ProtoMessage()

func (*InvalidShare) ProtoReflect

func (x *InvalidShare) ProtoReflect() protoreflect.Message

func (*InvalidShare) Reset

func (x *InvalidShare) Reset()

func (*InvalidShare) String

func (x *InvalidShare) String() string

type MESSAGETYPE

type MESSAGETYPE int32
const (
	MESSAGETYPE_SHARE        MESSAGETYPE = 0
	MESSAGETYPE_BLOCK        MESSAGETYPE = 1
	MESSAGETYPE_INVALIDSHARE MESSAGETYPE = 2
)

func (MESSAGETYPE) Descriptor

func (MESSAGETYPE) Enum

func (x MESSAGETYPE) Enum() *MESSAGETYPE

func (MESSAGETYPE) EnumDescriptor deprecated

func (MESSAGETYPE) EnumDescriptor() ([]byte, []int)

Deprecated: Use MESSAGETYPE.Descriptor instead.

func (MESSAGETYPE) Number

func (x MESSAGETYPE) Number() protoreflect.EnumNumber

func (MESSAGETYPE) String

func (x MESSAGETYPE) String() string

func (MESSAGETYPE) Type

func (*MESSAGETYPE) UnmarshalJSON deprecated

func (x *MESSAGETYPE) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type MinerData

type MinerData struct {
	Source         *int32  `protobuf:"varint,1,req,name=source" json:"source,omitempty"`
	MinerId        []byte  `protobuf:"bytes,2,req,name=miner_id,json=minerId" json:"miner_id,omitempty"`
	Difficulty     *int32  `protobuf:"varint,3,req,name=difficulty" json:"difficulty,omitempty"`
	ConnectionTime *int32  `protobuf:"varint,4,opt,name=connectionTime" json:"connectionTime,omitempty"`
	UserAgent      *string `protobuf:"bytes,5,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"`
	// contains filtered or unexported fields
}

func (*MinerData) Descriptor deprecated

func (*MinerData) Descriptor() ([]byte, []int)

Deprecated: Use MinerData.ProtoReflect.Descriptor instead.

func (*MinerData) GetConnectionTime

func (x *MinerData) GetConnectionTime() int32

func (*MinerData) GetDifficulty

func (x *MinerData) GetDifficulty() int32

func (*MinerData) GetMinerId

func (x *MinerData) GetMinerId() []byte

func (*MinerData) GetSource

func (x *MinerData) GetSource() int32

func (*MinerData) GetUserAgent

func (x *MinerData) GetUserAgent() string

func (*MinerData) ProtoMessage

func (*MinerData) ProtoMessage()

func (*MinerData) ProtoReflect

func (x *MinerData) ProtoReflect() protoreflect.Message

func (*MinerData) Reset

func (x *MinerData) Reset()

func (*MinerData) String

func (x *MinerData) String() string

type POOLTYPE

type POOLTYPE int32
const (
	POOLTYPE_PPLNS POOLTYPE = 0
	POOLTYPE_PPS   POOLTYPE = 1
	POOLTYPE_PROP  POOLTYPE = 2
	POOLTYPE_SOLO  POOLTYPE = 3
)

func (POOLTYPE) Descriptor

func (POOLTYPE) Descriptor() protoreflect.EnumDescriptor

func (POOLTYPE) Enum

func (x POOLTYPE) Enum() *POOLTYPE

func (POOLTYPE) EnumDescriptor deprecated

func (POOLTYPE) EnumDescriptor() ([]byte, []int)

Deprecated: Use POOLTYPE.Descriptor instead.

func (POOLTYPE) Number

func (x POOLTYPE) Number() protoreflect.EnumNumber

func (POOLTYPE) String

func (x POOLTYPE) String() string

func (POOLTYPE) Type

func (*POOLTYPE) UnmarshalJSON deprecated

func (x *POOLTYPE) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type PoolCheckin

type PoolCheckin struct {
	CurrentTime int64          `json:"current_time"`
	PoolId      int            `json:"pool_id"`
	BlockId     int            `json:"block_id"`
	Ports       map[string]int `json:"ports"`
}

type PoolInit

type PoolInit struct {
	Ports []struct {
		Port       int    `json:"port"`
		Difficulty int    `json:"difficulty"`
		Desc       string `json:"desc"`
		PortType   string `json:"portType"`
		Hidden     bool   `json:"hidden"`
		Ssl        bool   `json:"ssl"`
	} `json:"ports"`
	PoolId   int    `json:"pool_id"`
	PoolIp   string `json:"pool_ip"`
	Hostname string `json:"hostname"`
}

type PortConfig

type PortConfig struct {
	PoolPort   int    `json:"poolPort"`
	Difficulty int    `json:"difficulty"`
	PortDesc   string `json:"portDesc"`
	PortType   string `json:"portType"`
	Hidden     bool   `json:"hidden"`
	Ssl        bool   `json:"ssl"`
}

type PortPush

type PortPush []PortConfig

type Share

type Share struct {
	Shares         *int32    `protobuf:"varint,1,req,name=shares" json:"shares,omitempty"`
	PaymentAddress *string   `protobuf:"bytes,2,req,name=paymentAddress" json:"paymentAddress,omitempty"`
	FoundBlock     *bool     `protobuf:"varint,3,req,name=foundBlock" json:"foundBlock,omitempty"`
	PaymentID      *string   `protobuf:"bytes,4,opt,name=paymentID" json:"paymentID,omitempty"`
	TrustedShare   *bool     `protobuf:"varint,5,req,name=trustedShare" json:"trustedShare,omitempty"`
	PoolType       *POOLTYPE `protobuf:"varint,6,req,name=poolType,enum=support.POOLTYPE" json:"poolType,omitempty"`
	PoolID         *int32    `protobuf:"varint,7,req,name=poolID" json:"poolID,omitempty"`
	BlockDiff      *int64    `protobuf:"varint,8,req,name=blockDiff" json:"blockDiff,omitempty"`
	Bitcoin        *bool     `protobuf:"varint,9,req,name=bitcoin" json:"bitcoin,omitempty"`
	BlockHeight    *int32    `protobuf:"varint,10,req,name=blockHeight" json:"blockHeight,omitempty"`
	Timestamp      *int64    `protobuf:"varint,11,req,name=timestamp" json:"timestamp,omitempty"`
	Identifier     *string   `protobuf:"bytes,12,req,name=identifier" json:"identifier,omitempty"`
	BlobData       []byte    `protobuf:"bytes,13,opt,name=blobData" json:"blobData,omitempty"`
	MinerHex       *string   `protobuf:"bytes,14,opt,name=minerHex" json:"minerHex,omitempty"`
	SeedHash       []byte    `protobuf:"bytes,15,opt,name=seedHash" json:"seedHash,omitempty"`
	// contains filtered or unexported fields
}

func (*Share) Descriptor deprecated

func (*Share) Descriptor() ([]byte, []int)

Deprecated: Use Share.ProtoReflect.Descriptor instead.

func (*Share) GetBitcoin

func (x *Share) GetBitcoin() bool

func (*Share) GetBlobData

func (x *Share) GetBlobData() []byte

func (*Share) GetBlockDiff

func (x *Share) GetBlockDiff() int64

func (*Share) GetBlockHeight

func (x *Share) GetBlockHeight() int32

func (*Share) GetFoundBlock

func (x *Share) GetFoundBlock() bool

func (*Share) GetIdentifier

func (x *Share) GetIdentifier() string

func (*Share) GetMinerHex

func (x *Share) GetMinerHex() string

func (*Share) GetPaymentAddress

func (x *Share) GetPaymentAddress() string

func (*Share) GetPaymentID

func (x *Share) GetPaymentID() string

func (*Share) GetPoolID

func (x *Share) GetPoolID() int32

func (*Share) GetPoolType

func (x *Share) GetPoolType() POOLTYPE

func (*Share) GetSeedHash

func (x *Share) GetSeedHash() []byte

func (*Share) GetShares

func (x *Share) GetShares() int32

func (*Share) GetTimestamp

func (x *Share) GetTimestamp() int64

func (*Share) GetTrustedShare

func (x *Share) GetTrustedShare() bool

func (*Share) ProtoMessage

func (*Share) ProtoMessage()

func (*Share) ProtoReflect

func (x *Share) ProtoReflect() protoreflect.Message

func (*Share) Reset

func (x *Share) Reset()

func (*Share) String

func (x *Share) String() string

type WSData

type WSData struct {
	MsgType *MESSAGETYPE `protobuf:"varint,1,req,name=msgType,enum=support.MESSAGETYPE" json:"msgType,omitempty"`
	Key     *string      `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
	Msg     []byte       `protobuf:"bytes,3,req,name=msg" json:"msg,omitempty"`
	ExInt   *int32       `protobuf:"varint,4,req,name=exInt" json:"exInt,omitempty"`
	// contains filtered or unexported fields
}

func (*WSData) Descriptor deprecated

func (*WSData) Descriptor() ([]byte, []int)

Deprecated: Use WSData.ProtoReflect.Descriptor instead.

func (*WSData) GetExInt

func (x *WSData) GetExInt() int32

func (*WSData) GetKey

func (x *WSData) GetKey() string

func (*WSData) GetMsg

func (x *WSData) GetMsg() []byte

func (*WSData) GetMsgType

func (x *WSData) GetMsgType() MESSAGETYPE

func (*WSData) ProtoMessage

func (*WSData) ProtoMessage()

func (*WSData) ProtoReflect

func (x *WSData) ProtoReflect() protoreflect.Message

func (*WSData) Reset

func (x *WSData) Reset()

func (*WSData) String

func (x *WSData) String() string

Jump to

Keyboard shortcuts

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