Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BlockTimeChecker ¶
type BlockTimeChecker interface { TimeToGenerate(position int64) (bool, error) BlockForTimeExists(t time.Time, nodePosition int) (bool, error) RangeByTime(at time.Time) (start, end time.Time, err error) }
BlockTimeChecker allow check queue to generate current block
type BlockTimeCounter ¶
type BlockTimeCounter struct {
// contains filtered or unexported fields
}
func NewBlockTimeCounter ¶
func NewBlockTimeCounter() *BlockTimeCounter
NewBlockTimeCounter return initialized BlockTimeCounter
func (*BlockTimeCounter) BlockForTimeExists ¶
BlockForTimeExists checks conformity between time and nodePosition changes functionality of ValidateBlock prevent blockTimeCalculator
func (*BlockTimeCounter) RangeByTime ¶
RangeByTime returns start and end of interval by time
func (*BlockTimeCounter) TimeToGenerate ¶
TimeToGenerate returns true if the generation queue at time belongs to the specified node
Click to show internal directories.
Click to hide internal directories.