Documentation ¶
Index ¶
- type MiniBlockHashes
- type ProcessedMiniBlockTracker
- func (pmb *ProcessedMiniBlockTracker) AddMiniBlockHash(metaBlockHash string, miniBlockHash string)
- func (pmb *ProcessedMiniBlockTracker) ConvertProcessedMiniBlocksMapToSlice() []bootstrapStorage.MiniBlocksInMeta
- func (pmb *ProcessedMiniBlockTracker) ConvertSliceToProcessedMiniBlocksMap(miniBlocksInMetaBlocks []bootstrapStorage.MiniBlocksInMeta)
- func (pmb *ProcessedMiniBlockTracker) DisplayProcessedMiniBlocks()
- func (pmb *ProcessedMiniBlockTracker) GetProcessedMiniBlocksHashes(metaBlockHash string) map[string]struct{}
- func (pmb *ProcessedMiniBlockTracker) IsMiniBlockProcessed(metaBlockHash string, miniBlockHash string) bool
- func (pmb *ProcessedMiniBlockTracker) RemoveMetaBlockHash(metaBlockHash string)
- func (pmb *ProcessedMiniBlockTracker) RemoveMiniBlockHash(miniBlockHash string)
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