types

package
v0.0.0-...-2a6ccb1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Hash              string   `json:"hash"`
	Confirmations     int      `json:"confirmations"`
	StrippedSize      int      `json:"strippedsize"`
	Size              int      `json:"size"`
	Weight            int      `json:"weight"`
	Height            int      `json:"height"`
	Version           int      `json:"version"`
	VersionHex        string   `json:"versionHex"`
	MerkleRoot        string   `json:"merkleroot"`
	Tx                []string `json:"tx"`
	Time              int      `json:"time"`
	MedianTime        int      `json:"mediantime"`
	Nonce             int      `json:"nonce"`
	Bits              string   `json:"bits"`
	Difficulty        float64  `json:"difficulty"`
	ChainWork         string   `json:"chainwork"`
	NTx               int      `json:"nTx"`
	PreviousBlockHash string   `json:"previousblockhash"`
}

Block is a basic type for db storage

type ErrorWrap

type ErrorWrap int
const (
	ErrJobNotFound              ErrorWrap = 20
	ErrIncorrectExtraNonce2Size ErrorWrap = 21
	ErrIncorrectNTimeSize       ErrorWrap = 22
	ErrNTimeOutOfRange          ErrorWrap = 23
	ErrIncorrectNonceSize       ErrorWrap = 24
	ErrDuplicateShare           ErrorWrap = 25
	ErrLowDiffShare             ErrorWrap = 26
)

func (ErrorWrap) String

func (err ErrorWrap) String() string

type Share

type Share struct {
	JobId       string    `json:"jobId"`
	RemoteAddr  net.Addr  `json:"remoteAddr"`
	Miner       string    `json:"miner"`
	Rig         string    `json:"rig"`
	ErrorCode   ErrorWrap `json:"errorCode"`
	BlockHeight int64     `json:"height"`
	BlockReward uint64    `json:"blockReward"`
	Diff        float64   `json:"shareDiff"`
	BlockHash   string    `json:"blockHash"`
	BlockHex    string    `json:"blockHex"`
	TxHash      string    `json:"txHash"`
}

Jump to

Keyboard shortcuts

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