Documentation ¶
Overview ¶
Package hashrate is a message type for Simplebuffers generated by miners to broadcast an IP address, a count and version number and current height of mining work just completed. This data should be stored in a log file and added together to generate hashrate reporting in nodes when their controller is running
Index ¶
- Variables
- func Check(err error) bool
- func Debug(a ...interface{})
- func Debugc(fn func() string)
- func Debugf(format string, a ...interface{})
- func Debugs(a interface{})
- func Error(a ...interface{})
- func Errorc(fn func() string)
- func Errorf(format string, a ...interface{})
- func Errors(a interface{})
- func Fatal(a ...interface{})
- func Fatalc(fn func() string)
- func Fatalf(format string, a ...interface{})
- func Fatals(a interface{})
- func Info(a ...interface{})
- func Infoc(fn func() string)
- func Infof(format string, a ...interface{})
- func Infos(a interface{})
- func Trace(a ...interface{})
- func Tracec(fn func() string)
- func Tracef(format string, a ...interface{})
- func Traces(a interface{})
- func Warn(a ...interface{})
- func Warnc(fn func() string)
- func Warnf(format string, a ...interface{})
- func Warns(a interface{})
- type Container
- func (j *Container) GetCount() int
- func (j *Container) GetHeight() int32
- func (j *Container) GetID() string
- func (j *Container) GetIPs() []*net.IP
- func (j *Container) GetNonce() int32
- func (j *Container) GetTime() time.Time
- func (j *Container) GetVersion() int32
- func (j *Container) String() (s string)
- func (j *Container) Struct() (out Hashrate)
- type Hashrate
Constants ¶
This section is empty.
Variables ¶
var Magic = []byte{'h', 'a', 's', 'h'}
Functions ¶
Types ¶
type Container ¶
type Container struct {
simplebuffer.Container
}
func LoadContainer ¶
LoadContainer takes a message byte slice payload and loads it into a container ready to be decoded
func (*Container) GetVersion ¶
func (*Container) Struct ¶
Struct deserializes the data all in one go by calling the field deserializing functions into a structure containing the fields. The height is given in this report as it is part of the job message and makes it faster for clients to look up the algorithm name according to the block height, which can change between hard fork versions