pow

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 21 Imported by: 0

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