processedMb

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiniBlockHashes

type MiniBlockHashes map[string]struct{}

MiniBlockHashes will keep a list of miniblock hashes as keys in a map for easy access

type ProcessedMiniBlockTracker

type ProcessedMiniBlockTracker struct {
	// contains filtered or unexported fields
}

ProcessedMiniBlockTracker is used to store all processed mini blocks hashes grouped by a metahash

func NewProcessedMiniBlocks

func NewProcessedMiniBlocks() *ProcessedMiniBlockTracker

NewProcessedMiniBlocks will create a complex type of processedMb

func (*ProcessedMiniBlockTracker) AddMiniBlockHash

func (pmb *ProcessedMiniBlockTracker) AddMiniBlockHash(metaBlockHash string, miniBlockHash string)

AddMiniBlockHash will add a miniblock hash

func (*ProcessedMiniBlockTracker) ConvertProcessedMiniBlocksMapToSlice

func (pmb *ProcessedMiniBlockTracker) ConvertProcessedMiniBlocksMapToSlice() []bootstrapStorage.MiniBlocksInMeta

ConvertProcessedMiniBlocksMapToSlice will convert a map[string]map[string]struct{} in a slice of MiniBlocksInMeta

func (*ProcessedMiniBlockTracker) ConvertSliceToProcessedMiniBlocksMap

func (pmb *ProcessedMiniBlockTracker) ConvertSliceToProcessedMiniBlocksMap(miniBlocksInMetaBlocks []bootstrapStorage.MiniBlocksInMeta)

ConvertSliceToProcessedMiniBlocksMap will convert a slice of MiniBlocksInMeta in an map[string]MiniBlockHashes

func (*ProcessedMiniBlockTracker) DisplayProcessedMiniBlocks

func (pmb *ProcessedMiniBlockTracker) DisplayProcessedMiniBlocks()

DisplayProcessedMiniBlocks will display all miniblocks hashes and meta block hash from the map

func (*ProcessedMiniBlockTracker) GetProcessedMiniBlocksHashes

func (pmb *ProcessedMiniBlockTracker) GetProcessedMiniBlocksHashes(metaBlockHash string) map[string]struct{}

GetProcessedMiniBlocksHashes will return all processed miniblocks for a metablock

func (*ProcessedMiniBlockTracker) IsMiniBlockProcessed

func (pmb *ProcessedMiniBlockTracker) IsMiniBlockProcessed(metaBlockHash string, miniBlockHash string) bool

IsMiniBlockProcessed will return true if a mini block is processed

func (*ProcessedMiniBlockTracker) RemoveMetaBlockHash

func (pmb *ProcessedMiniBlockTracker) RemoveMetaBlockHash(metaBlockHash string)

RemoveMetaBlockHash will remove a meta block hash

func (*ProcessedMiniBlockTracker) RemoveMiniBlockHash

func (pmb *ProcessedMiniBlockTracker) RemoveMiniBlockHash(miniBlockHash string)

RemoveMiniBlockHash will remove a mini block hash

Jump to

Keyboard shortcuts

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