Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCannotFindSection = errors.New("cannot find section")
Functions ¶
This section is empty.
Types ¶
type BloomIndexer ¶
type BloomIndexer struct {
// contains filtered or unexported fields
}
BloomIndexer does a post-processing job for equally sized sections of the canonical chain (like BlooomBits and CHT structures).
func NewBloomIndexer ¶
func NewBloomIndexer(chainDb dbwrapper.Database) *BloomIndexer
NewBloomIndexer creates a new chain indexer to do background processing on chain segments of a given size after certain number of confirmations passed.
func (*BloomIndexer) Close ¶
func (b *BloomIndexer) Close() error
Close tears down all goroutines belonging to the indexer and returns any error that might have occurred internally.
func (*BloomIndexer) Start ¶
func (b *BloomIndexer) Start(chain blockChain)
Start makes some initialization settings for the bloom, including initialization when the system is restarted.
type Generator ¶
type Generator struct { Blooms [types.BloomBitLength][params.BloomByteSize]byte // Rotated Blooms for per-bit matching NextBloomId uint16 // Next section to set when adding a bloom }
Generator takes a number of bloom filters and generates the rotated bloom bits to be used for batched filtering.
func NewGenerator ¶
func NewGenerator() *Generator
NewGenerator creates a rotated bloom generator that can iteratively fill a batched bloom filter's bits.
type SectionBuildNotify ¶
type SectionWriter ¶
type SectionWriter struct {
// contains filtered or unexported fields
}
func NewSectionWriter ¶
func NewSectionWriter(chainDb dbwrapper.Database) *SectionWriter
func (*SectionWriter) ClearSection ¶
func (s *SectionWriter) ClearSection(secNum uint64)
func (*SectionWriter) ReplaceSectionBit ¶
func (*SectionWriter) WriteSection ¶
func (s *SectionWriter) WriteSection(secNum uint64, bloomSlice []logbloom.OneBloom) error