slashfilter

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStoreType

type BlockStoreType string
const (
	Local BlockStoreType = "local"
	MySQL BlockStoreType = "mysql"
)

type MinedBlock

type MinedBlock = types.MinedBlock

type SlashFilterAPI

type SlashFilterAPI interface {
	HasBlock(ctx context.Context, bh *vtypes.BlockHeader) (bool, error)
	MinedBlock(ctx context.Context, bh *vtypes.BlockHeader, parentEpoch abi.ChainEpoch) error
	PutBlock(ctx context.Context, bh *vtypes.BlockHeader, parentEpoch abi.ChainEpoch, t time.Time, state types.StateMining) error
	ListBlock(ctx context.Context, params *types.BlocksQueryParams) ([]MinedBlock, error)
}

func NewLocal

func NewLocal(ds types.MetadataDS) SlashFilterAPI

func NewLocalMock

func NewLocalMock() (SlashFilterAPI, datastore.Datastore, error)

func NewMysql

func NewMysql(cfg *config.MySQLConfig) (SlashFilterAPI, error)

func NewMysqlMock

func NewMysqlMock() (SlashFilterAPI, *gorm.DB, error)

Jump to

Keyboard shortcuts

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