pow

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockPersistCompletedSignal = make(chan common.Uint256)

Functions

func CreateCoinbaseTx added in v0.2.2

func CreateCoinbaseTx(minerAddr string) (*Transaction, error)

Types

type PowService

type PowService struct {
	PayToAddr string
	Started   bool

	AuxBlockPool auxBlockPool
	Mutex        sync.Mutex

	RollbackTransactionSubscriber events.Subscriber
	// contains filtered or unexported fields
}

func NewPowService

func NewPowService() *PowService

func (*PowService) BlockPersistCompleted

func (pow *PowService) BlockPersistCompleted(v interface{})

func (*PowService) BroadcastBlock

func (pow *PowService) BroadcastBlock(block *Block) error

func (*PowService) DiscreteMining

func (pow *PowService) DiscreteMining(n uint32) ([]*common.Uint256, error)

func (*PowService) GenerateBlock

func (pow *PowService) GenerateBlock(minerAddr string, bestChain *BlockNode) (*Block, error)

func (*PowService) Halt

func (pow *PowService) Halt()

func (*PowService) RollbackTransaction

func (pow *PowService) RollbackTransaction(v interface{})

func (*PowService) SolveBlock

func (pow *PowService) SolveBlock(msgBlock *Block, lastBlockHash *common.Uint256) bool

func (*PowService) Start

func (pow *PowService) Start()

Jump to

Keyboard shortcuts

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