pow

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 21 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

This section is empty.

Functions

This section is empty.

Types

type AuxBlockPool added in v0.3.0

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

func (*AuxBlockPool) AppendBlock added in v0.3.0

func (p *AuxBlockPool) AppendBlock(block *types.Block)

func (*AuxBlockPool) ClearBlock added in v0.3.0

func (p *AuxBlockPool) ClearBlock()

func (*AuxBlockPool) GetBlock added in v0.3.0

func (p *AuxBlockPool) GetBlock(hash common.Uint256) (*types.Block, bool)

type Config added in v0.3.0

type Config struct {
	PayToAddr      string
	MinerInfo      string
	Chain          *blockchain.BlockChain
	ChainParams    *config.Params
	TxMemPool      *mempool.TxPool
	BlkMemPool     *mempool.BlockPool
	BroadcastBlock func(block *types.Block)
	Arbitrators    state.Arbitrators
}

type Service added in v0.3.0

type Service struct {
	PayToAddr string
	MinerInfo string
	// contains filtered or unexported fields
}

func NewService added in v0.3.0

func NewService(cfg *Config) *Service

func (*Service) AssignCoinbaseTxRewards added in v0.3.0

func (pow *Service) AssignCoinbaseTxRewards(block *types.Block, totalReward common.Fixed64) error

func (*Service) CreateAuxBlock added in v0.3.0

func (pow *Service) CreateAuxBlock(payToAddr string) (*types.Block, error)

func (*Service) CreateCoinbaseTx added in v0.3.0

func (pow *Service) CreateCoinbaseTx(minerAddr string) (*types.Transaction, error)

func (*Service) DiscreteMining added in v0.3.0

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

func (*Service) GenerateBlock added in v0.3.0

func (pow *Service) GenerateBlock(minerAddr string) (*types.Block, error)

func (*Service) GetDefaultTxVersion added in v0.3.0

func (pow *Service) GetDefaultTxVersion(height uint32) types.TransactionVersion

func (*Service) Halt added in v0.3.0

func (pow *Service) Halt()

func (*Service) SolveBlock added in v0.3.0

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

func (*Service) Start added in v0.3.0

func (pow *Service) Start()

func (*Service) SubmitAuxBlock added in v0.3.0

func (pow *Service) SubmitAuxBlock(hash *common.Uint256, auxPow *auxpow.AuxPow) error

Jump to

Keyboard shortcuts

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