Documentation ¶
Index ¶
- Constants
- func NewClient(connectionstring, pooluser string, version string) (sc clients.Client)
- func NewSenHash() hash.Hash
- type Miner
- type SenHash
- type SentientdClient
- func (sc *SentientdClient) GetHeaderForWork() (target []byte, header []byte, deprecationChannel chan bool, job interface{}, ...)
- func (sc *SentientdClient) SetDeprecatedJobCall(call clients.DeprecatedJobCall)
- func (sc *SentientdClient) Start()
- func (sc *SentientdClient) SubmitHeader(header []byte, job interface{}) (err error)
- type StratumClient
- type Target
Constants ¶
const (
//HashSize is the length of a sentient hash
HashSize = 32
)
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient creates a new SentientdClient given a '[stratum+tcp://]host:port' connectionstring
func NewSenHash ¶
NewSenHash creates a new instance of SenHash with blake512 as the underlying hasher.
Types ¶
type Miner ¶
type Miner struct { ClDevices map[int]*cl.Device HashRateReports chan *mining.HashRateReport //Intensity defines the GlobalItemSize in a human friendly way, the GlobalItemSize = 2^Intensity Intensity int GlobalItemSize int Client clients.Client // contains filtered or unexported fields }
Miner actually mines
type SenHash ¶
type SenHash struct {
// contains filtered or unexported fields
}
SenHash is an abstraction to make blake-512 hasher return a 256-bit prefix. This is really a pretty lazy solution driven by lack of proper time and resources to fully switch the entire codebase to using 512-bit hashes and entropy.
func (SenHash) BlockSize ¶
BlockSize returns the hash's underlying block size. The Write method must be able to accept any amount of data, but it may operate more efficiently if all writes are a multiple of the block size.
type SentientdClient ¶
type SentientdClient struct {
// contains filtered or unexported fields
}
SentientdClient is a simple client to a sentientd
func (*SentientdClient) GetHeaderForWork ¶
func (sc *SentientdClient) GetHeaderForWork() (target []byte, header []byte, deprecationChannel chan bool, job interface{}, err error)
GetHeaderForWork fetches new work from the sentient daemon
func (*SentientdClient) SetDeprecatedJobCall ¶
func (sc *SentientdClient) SetDeprecatedJobCall(call clients.DeprecatedJobCall)
SetDeprecatedJobCall does nothing
func (*SentientdClient) SubmitHeader ¶
func (sc *SentientdClient) SubmitHeader(header []byte, job interface{}) (err error)
SubmitHeader reports a solved header to the sentient daemon
type StratumClient ¶
type StratumClient struct { User string Version string clients.BaseClient // contains filtered or unexported fields }
StratumClient is a sentient client using the stratum protocol
func (*StratumClient) GetHeaderForWork ¶
func (sc *StratumClient) GetHeaderForWork() (target []byte, header []byte, deprecationChannel chan bool, job interface{}, err error)
GetHeaderForWork fetches new work over the stratum protocol
func (*StratumClient) Start ¶
func (sc *StratumClient) Start()
Start connects to the stratumserver and processes the notifications
func (*StratumClient) SubmitHeader ¶
func (sc *StratumClient) SubmitHeader(header []byte, job interface{}) (err error)
SubmitHeader reports a solution to the stratum server