Versions in this module Expand all Collapse all v1 v1.0.0 Apr 25, 2019 Changes in this version + const HashLength + func CopyBytes(src []byte) (dst []byte) + func GenerateRandomBytes() []byte + type ByTime []time.Time + func (t ByTime) Len() int + func (t ByTime) Less(i, j int) bool + func (t ByTime) Swap(i, j int) + type CustomLogger struct + func NewCustomLogger(logger *log.Logger) *CustomLogger + func (logger *CustomLogger) Debug(msg string, ctx ...interface{}) + func (logger *CustomLogger) Error(msg string, ctx ...interface{}) + func (logger *CustomLogger) Info(msg string, ctx ...interface{}) + func (logger *CustomLogger) Trace(msg string, ctx ...interface{}) + func (logger *CustomLogger) Warn(msg string, ctx ...interface{}) + type Event struct + func NewEvent() *Event + func (e *Event) NotifyHeight(h uint64) + func (e *Event) RegisterHeight(h uint64, fn heightEventFn) + func (e *Event) Reset() + type Hash [HashLength]byte + func NewRandomHash() Hash + func (h *Hash) UnmarshalText(text []byte) error + func (h Hash) Bytes() []byte + func (h Hash) Equal(hp Hash) bool + func (h Hash) Less(hp Hash) bool + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) String() string + type Hashes []Hash + func (hs Hashes) Len() int + func (hs Hashes) Less(i, j int) bool + func (hs Hashes) Swap(i, j int) + type Logger interface + Debug func(msg string, ctx ...interface{}) + Error func(msg string, ctx ...interface{}) + Info func(msg string, ctx ...interface{}) + Trace func(msg string, ctx ...interface{}) + Warn func(msg string, ctx ...interface{}) + type NullLogger struct + func (logger *NullLogger) Debug(msg string, ctx ...interface{}) + func (logger *NullLogger) Error(msg string, ctx ...interface{}) + func (logger *NullLogger) Info(msg string, ctx ...interface{}) + func (logger *NullLogger) Trace(msg string, ctx ...interface{}) + func (logger *NullLogger) Warn(msg string, ctx ...interface{}) + type SimpleLogger struct + func (logger *SimpleLogger) Debug(msg string, ctx ...interface{}) + func (logger *SimpleLogger) Error(msg string, ctx ...interface{}) + func (logger *SimpleLogger) Info(msg string, ctx ...interface{}) + func (logger *SimpleLogger) Trace(msg string, ctx ...interface{}) + func (logger *SimpleLogger) Warn(msg string, ctx ...interface{}) + type SortedHashes Hashes + func NewSortedHashes(hs Hashes) SortedHashes