logbloom

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2020 License: LGPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BloomList

type BloomList struct {
	BListMap   map[uint64]*SectionBlooms
	HeadHeight uint64
	Mu         sync.RWMutex
}

func GetBloomList

func GetBloomList() *BloomList

func (*BloomList) GetLast

func (bloomList *BloomList) GetLast() uint64

func (*BloomList) InsertBlockBloom

func (bloomList *BloomList) InsertBlockBloom(db dbaccessor.DatabaseReader, block *types.BlockHeader, cachedBloom *types.Bloom) uint64

func (*BloomList) InsertBlockSectionBloom

func (bloomList *BloomList) InsertBlockSectionBloom(db dbaccessor.DatabaseReader, blocks []*types.BlockHeader) uint64

func (*BloomList) ResetBlockBloomDb

func (bloomList *BloomList) ResetBlockBloomDb(db dbaccessor.DatabaseReader, blocks []*types.BlockHeader, headBlockCachedBloom *types.Bloom) ([]OneBloom, []*types.BlockHeader)

The first one of the input blocks is the common ancestor, and its original descendants need to be reset.

func (*BloomList) ResetBlockBloomMap

func (bloomList *BloomList) ResetBlockBloomMap(db dbaccessor.DatabaseReader, blocks []*types.BlockHeader, headBlockCachedBloom *types.Bloom) []*types.BlockHeader

The first one of the input blocks is the common ancestor, and its original descendants need to be reset.

type OneBloom

type OneBloom struct {
	BlockFullHash common.Hash
	BloomBit      *types.Bloom
}

type SectionBlooms

type SectionBlooms struct {
	Blooms            [params.BloomBitsSize]OneBloom
	BloomSaveBitFlags [params.BloomByteSize]byte
}

func (*SectionBlooms) CheckBitFlag

func (s *SectionBlooms) CheckBitFlag(bitIndex uint16) bool

func (*SectionBlooms) IsFull

func (s *SectionBlooms) IsFull() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL