Documentation
¶
Index ¶
- func CreateCoinBaseTx(cfg *Config, nextBlockHeight uint32, addr string) (*types.Transaction, error)
- func DisableLog()
- func GenerateBlock(cfg *Config) (*types.Block, error)
- func GenerateBlockTransactions(cfg *Config, msgBlock *types.Block, coinBaseTx *types.Transaction)
- func NewCoinBaseTransaction(coinBasePayload *types.PayloadCoinBase, currentHeight uint32) *types.Transaction
- func UseLogger(logger elalog.Logger)
- type ByFeeDesc
- type Config
- type Service
- func (s *Service) CollectTransactions(msgBlock *types.Block) int
- func (s *Service) CpuMining()
- func (s *Service) DiscreteMining(n uint32) ([]*common.Uint256, error)
- func (s *Service) GenerateAuxBlock(addr string) (*types.Block, string, bool)
- func (s *Service) GetTransactionCount() int
- func (s *Service) Halt()
- func (s *Service) SetMinerAddr(minerAddr string)
- func (s *Service) SolveBlock(msgBlock *types.Block, ticker *time.Ticker) bool
- func (s *Service) Start()
- func (s *Service) SubmitAuxBlock(blockHash string, sideAuxData []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCoinBaseTx ¶ added in v0.1.1
func DisableLog ¶ added in v0.1.1
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func GenerateBlockTransactions ¶ added in v0.1.1
func GenerateBlockTransactions(cfg *Config, msgBlock *types.Block, coinBaseTx *types.Transaction)
func NewCoinBaseTransaction ¶ added in v0.1.1
func NewCoinBaseTransaction(coinBasePayload *types.PayloadCoinBase, currentHeight uint32) *types.Transaction
Types ¶
type ByFeeDesc ¶ added in v0.1.1
type ByFeeDesc []*types.Transaction
type Config ¶ added in v0.1.1
type Config struct {
ChainParams *config.Params
MinerAddr string
MinerInfo string
Server server.IServer
Chain *blockchain.BlockChain
TxMemPool *mempool.TxPool
TxFeeHelper *mempool.FeeHelper
CreateCoinBaseTx func(cfg *Config, nextBlockHeight uint32, addr string) (*types.Transaction, error)
GenerateBlock func(cfg *Config) (*types.Block, error)
GenerateBlockTransactions func(cfg *Config, msgBlock *types.Block, coinBaseTx *types.Transaction)
}
type Service ¶ added in v0.1.1
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶ added in v0.1.1
func (*Service) CollectTransactions ¶ added in v0.1.1
func (*Service) DiscreteMining ¶ added in v0.1.1
func (*Service) GenerateAuxBlock ¶ added in v0.1.1
func (*Service) GetTransactionCount ¶ added in v0.1.1
func (*Service) SetMinerAddr ¶ added in v0.1.1
func (*Service) SolveBlock ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.