storage

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HashedPrivateKey = "hashed-private-key"

Functions

This section is empty.

Types

type ConfigLock added in v1.1.0

type ConfigLock struct {
	NetworkName      string `json:"network_name"`
	UsingLocalEvents bool   `json:"using_local_events"`
}

func (*ConfigLock) EnsureSameWith added in v1.1.0

func (stored *ConfigLock) EnsureSameWith(current *ConfigLock) error

type Storage

type Storage interface {
	Begin() basedb.Txn
	BeginRead() basedb.ReadTxn

	SaveLastProcessedBlock(rw basedb.ReadWriter, offset *big.Int) error
	GetLastProcessedBlock(r basedb.Reader) (*big.Int, bool, error)

	GetConfig(rw basedb.ReadWriter) (*ConfigLock, bool, error)
	SaveConfig(rw basedb.ReadWriter, config *ConfigLock) error
	DeleteConfig(rw basedb.ReadWriter) error

	registry.RegistryStore

	registrystorage.Operators
	registrystorage.Recipients
	Shares() registrystorage.Shares

	GetPrivateKeyHash() (string, bool, error)
	SavePrivateKeyHash(privKeyHash string) error
}

Storage represents the interface for ssv node storage

func NewNodeStorage

func NewNodeStorage(logger *zap.Logger, db basedb.Database) (Storage, error)

NewNodeStorage creates a new instance of Storage

Jump to

Keyboard shortcuts

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