pebble

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const PeriodRewardsPrefix = "pr"

Variables

This section is empty.

Functions

func GetPrefix added in v0.3.0

func GetPrefix(o interface{}) (ret string)

Types

type Batch

type Batch struct {
	*pebble.Batch
	Mutex *sync.RWMutex
}

func (*Batch) AddToBatch

func (b *Batch) AddToBatch(o interface{}, key1 string, key2 uint64)

func (*Batch) AddToBatchFullKey added in v0.3.0

func (b *Batch) AddToBatchFullKey(o interface{}, key []byte) error

func (*Batch) AddToBatchSingleKey

func (b *Batch) AddToBatchSingleKey(o interface{}, key string)

func (*Batch) CommitBatch

func (b *Batch) CommitBatch()

func (*Batch) Remove

func (b *Batch) Remove(key []byte)

func (*Batch) SaveAccounts

func (b *Batch) SaveAccounts(a storage.Accounts)

func (*Batch) SetFinalizationData

func (b *Batch) SetFinalizationData(f *storage.FinalizationData)

func (*Batch) SetGenesisHash

func (b *Batch) SetGenesisHash(h storage.GenesisHash)

func (*Batch) SetTotalSupply

func (b *Batch) SetTotalSupply(s *storage.TotalSupply)

func (*Batch) UpdateWeekStats

func (b *Batch) UpdateWeekStats(w storage.WeekStats)

type Storage

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

func NewStorage

func NewStorage(file string) *Storage

func (*Storage) Clean

func (s *Storage) Clean() error

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) ForEach

func (s *Storage) ForEach(o interface{}, key_prefix string, start *uint64, fn func(key, res []byte) (stop bool))

func (*Storage) ForEachBackwards

func (s *Storage) ForEachBackwards(o interface{}, key_prefix string, start *uint64, fn func(key, res []byte) (stop bool))

func (*Storage) ForEachFromKey added in v0.3.0

func (s *Storage) ForEachFromKey(prefix, start_key []byte, fn func(key, res []byte) (stop bool))

func (*Storage) GenesisHashExist

func (s *Storage) GenesisHashExist() bool

func (*Storage) GetAccounts

func (s *Storage) GetAccounts() storage.Accounts

func (*Storage) GetAddressStats

func (s *Storage) GetAddressStats(addr string) *storage.AddressStats

func (*Storage) GetFinalizationData

func (s *Storage) GetFinalizationData() *storage.FinalizationData

func (*Storage) GetFromDB added in v0.3.0

func (s *Storage) GetFromDB(o interface{}, key []byte) error

func (*Storage) GetGenesisHash

func (s *Storage) GetGenesisHash() storage.GenesisHash

func (*Storage) GetInternalTransactions

func (s *Storage) GetInternalTransactions(hash string) models.InternalTransactionsResponse

func (*Storage) GetTotalSupply

func (s *Storage) GetTotalSupply() *storage.TotalSupply

func (*Storage) GetTotalYield

func (s *Storage) GetTotalYield(block uint64) (res storage.Yield)

func (*Storage) GetTransactionByHash added in v0.2.3

func (s *Storage) GetTransactionByHash(hash string) (res models.Transaction)

func (*Storage) GetTransactionLogs

func (s *Storage) GetTransactionLogs(hash string) models.TransactionLogsResponse

func (*Storage) GetValidatorYield

func (s *Storage) GetValidatorYield(validator string, block uint64) (res storage.Yield)

func (*Storage) GetWeekStats

func (s *Storage) GetWeekStats(year, week int32) storage.WeekStats

func (*Storage) NewBatch

func (s *Storage) NewBatch() storage.Batch

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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