cpuminer

package
v0.0.0-...-5a53b6d Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package cpuminer is a port(-ish) of the orginal cpuminer project, written by Jeff Garzik and pooler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Routines          int // Number of miner routines to run. Defaults to 1.
	CoinbaseAddress   string
	CoinbaseSignature string

	// Maximum time to spend scanning the current work. Defaults to 1 minute.
	ScanTime time.Duration

	RpcURL  string
	RpcUser string
	RpcPass string
}

type Miner

type Miner struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Miner, error)

func (*Miner) AcceptedBlocks

func (m *Miner) AcceptedBlocks() <-chan chainhash.Hash

func (*Miner) GetHashes

func (m *Miner) GetHashes() uint64

GetHashes returns the total number of hashes performed by the miner

func (*Miner) Start

func (m *Miner) Start(ctx context.Context) error

type Work

type Work struct {
	Target *big.Int

	Height int
	Txs    string
	WorkID string

	JobID string
	// contains filtered or unexported fields
}

Work represents a unit of mining work

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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