miner

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoTransactionsErr = errors.New("no transactions")
View Source
var StateChangedErr = errors.New("state changed")

Functions

func FeaturesToInt16 added in v0.5.0

func FeaturesToInt16(a []settings.Feature) []int16

func MineBlock added in v0.5.0

func MineBlock(version proto.BlockVersion, nxt proto.NxtConsensus, pair proto.KeyPair, validatedFeatured Features, t proto.Timestamp, parent proto.BlockID, reward int64, scheme proto.Scheme) (*proto.Block, error)

func ParseReward added in v0.5.0

func ParseReward(s string) (int64, error)

func Run

func Run(ctx context.Context, a types.Miner, s Mine, internalCh chan<- messages.InternalMessage)

Types

type Constraints

type Constraints struct {
	MaxScriptRunsInBlock        int
	MaxScriptsComplexityInBlock state.MaxScriptsComplexityInBlock
	ClassicAmountOfTxsInBlock   int
	MaxTxsSizeInBytes           int
}

func DefaultConstraints

func DefaultConstraints() Constraints

type Features added in v0.5.0

type Features []settings.Feature

func ParseVoteFeatures added in v0.5.0

func ParseVoteFeatures(s string) (Features, error)

func ValidateFeatures added in v0.6.0

func ValidateFeatures(state featureState, features Features) (Features, error)

type MicroMiner added in v0.6.0

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

func NewMicroMiner added in v0.6.0

func NewMicroMiner(services services.Services) *MicroMiner

func (*MicroMiner) Micro added in v0.6.0

func (a *MicroMiner) Micro(minedBlock *proto.Block, rest proto.MiningLimits, keyPair proto.KeyPair) (*proto.Block, *proto.MicroBlock, proto.MiningLimits, error)

type MicroblockMiner

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

func NewMicroblockMiner

func NewMicroblockMiner(services services.Services, features Features, reward int64, maxTransactionTimeForwardOffset proto.Timestamp) *MicroblockMiner

func (*MicroblockMiner) MineKeyBlock added in v0.6.0

func (a *MicroblockMiner) MineKeyBlock(ctx context.Context, t proto.Timestamp, k proto.KeyPair, parent proto.BlockID, baseTarget types.BaseTarget, gs []byte, vrf []byte) (*proto.Block, proto.MiningLimits, error)

type Mine added in v0.8.0

type Mine interface {
	Mine() chan scheduler.Emit
}

Directories

Path Synopsis
Package utxpool is a generated GoMock package.
Package utxpool is a generated GoMock package.

Jump to

Keyboard shortcuts

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