Documentation ¶
Index ¶
- Variables
- type PowService
- func (pow *PowService) BlockPersistCompleted(v interface{})
- func (pow *PowService) BroadcastBlock(MsgBlock *ledger.Block) error
- func (pow *PowService) CollectTransactions(MsgBlock *ledger.Block) int
- func (pow *PowService) CreateCoinbaseTrx(nextBlockHeight uint32, addr string) (*tx.Transaction, error)
- func (pow *PowService) GenerateBlock(addr string) (*ledger.Block, error)
- func (pow *PowService) GetTransactionCount() int
- func (pow *PowService) Halt()
- func (pow *PowService) ManualMining(n uint32) ([]*Uint256, error)
- func (pow *PowService) RollbackTransaction(v interface{})
- func (pow *PowService) SolveBlock(MsgBlock *ledger.Block, ticker *time.Ticker) bool
- func (pow *PowService) Start()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TargetTimePerBlock = int64(config.Parameters.ChainParam.TargetTimePerBlock / time.Second) OrginAmountOfEla = 3300 * 10000 * 100000000 SubsidyInterval = 365 * 24 * 60 * 60 / TargetTimePerBlock RetargetPersent = 25 )
View Source
var TaskCh chan bool
Functions ¶
This section is empty.
Types ¶
type PowService ¶
type PowService struct { PayToAddr string MsgBlock msgBlock Mutex sync.Mutex Started bool RollbackTransactionSubscriber events.Subscriber // contains filtered or unexported fields }
func NewPowService ¶
func NewPowService(logDictionary string, localNet protocol.Noder) *PowService
func (*PowService) BlockPersistCompleted ¶
func (pow *PowService) BlockPersistCompleted(v interface{})
func (*PowService) BroadcastBlock ¶
func (pow *PowService) BroadcastBlock(MsgBlock *ledger.Block) error
func (*PowService) CollectTransactions ¶
func (pow *PowService) CollectTransactions(MsgBlock *ledger.Block) int
func (*PowService) CreateCoinbaseTrx ¶
func (pow *PowService) CreateCoinbaseTrx(nextBlockHeight uint32, addr string) (*tx.Transaction, error)
func (*PowService) GenerateBlock ¶
func (pow *PowService) GenerateBlock(addr string) (*ledger.Block, error)
func (*PowService) GetTransactionCount ¶
func (pow *PowService) GetTransactionCount() int
func (*PowService) Halt ¶
func (pow *PowService) Halt()
func (*PowService) ManualMining ¶
func (pow *PowService) ManualMining(n uint32) ([]*Uint256, error)
func (*PowService) RollbackTransaction ¶
func (pow *PowService) RollbackTransaction(v interface{})
func (*PowService) SolveBlock ¶
func (*PowService) Start ¶
func (pow *PowService) Start()
Click to show internal directories.
Click to hide internal directories.