Documentation ¶
Overview ¶
Copyright (c) 2018-2020. The asimov developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2018-2020. The asimov developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // BlockTemplateGenerator identifies the instance to use in order to // generate block templates that the miner will attempt to solve. BlockTemplateGenerator *mining.BlkTmplGenerator // ProcessBlock defines the function to call with any solved blocks. // It typically must run the provided block through the same set of // rules and handling as any other block coming from the network. ProcessBlock func(*mining.BlockTemplate, common.BehaviorFlags) (bool, error) // IsCurrent defines the function to use to obtain whether or not the // block chain is current. This is used by the automatic persistent // mining routine to determine whether or it should attempt mining. // This is useful because there is no point in mining if the chain is // not current since any solved blocks would be on a side chain and and // up orphaned anyways. IsCurrent func() bool ProcessSig func(*asiutil.BlockSign) error Chain *blockchain.BlockChain GasFloor uint64 // Target gas floor for mined blocks. GasCeil uint64 // Target gas ceiling for mined blocks. RoundManager ainterface.IRoundManager // Account provide a private key to sign a new produced block. Account *crypto.Account }
type Context ¶
type Context struct { // RoundInterval indicates the interval a round cost, unit in seconds RoundInterval int64 // the round Round int64 // the slot in a round Slot int64 // RoundStartTime indicates the timestamp when a round start, unit in seconds RoundStartTime int64 // the round size RoundSize int64 }
Context used in consensus service
Click to show internal directories.
Click to hide internal directories.