index

package
v0.0.0-...-b3cf9e2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

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

func NewIndexer

func NewIndexer(store IndexerStore, l1url string, l1ConfirmBlocks int, taskInterval string, l1StartBlockNumber uint64) (Indexer, error)

func (Indexer) ObserveMessageHashAppended

func (o Indexer) ObserveMessageHashAppended(scannedHeight uint64)

func (Indexer) Start

func (o Indexer) Start()

func (Indexer) Stop

func (o Indexer) Stop()

type IndexerStore

type IndexerStore interface {
	MessageHashStore
	ScanHeightStore
}

type MessageHashInfo

type MessageHashInfo struct {
	MessageHash  string   `json:"message_hash"`
	ElectionId   uint64   `json:"election_id"`
	AbsentNodes  []string `json:"absent_nodes"`
	WorkingNodes []string `json:"working_nodes"`
	BatchIndex   uint64   `json:"batch_index"`
}

type MessageHashStore

type MessageHashStore interface {
	SetMessageHash(MessageHashInfo) error
	GetMessageHash([32]byte) (bool, MessageHashInfo)
	IndexMessageHash(uint64, [32]byte) error
	GetIndexMessageHash(index uint64) (bool, [32]byte)
}

type ScanHeightStore

type ScanHeightStore interface {
	UpdateHeight(uint64) error
	GetScannedHeight() (uint64, error)
}

Jump to

Keyboard shortcuts

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