state

package
v1.11.12-ubuntu-noble.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: BSD-3-Clause Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBlock

func AddBlock(db database.KeyValueWriter, height uint64, blkID ids.ID, blk []byte) error

func AddLoanID

func AddLoanID(db database.KeyValueWriter, chainID ids.ID, loanID ids.ID) error

func DecreaseBalance

func DecreaseBalance(db database.KeyValueReaderWriterDeleter, address ids.ShortID, chainID ids.ID, amount uint64) error

func DecreaseLoan

func DecreaseLoan(db database.KeyValueReaderWriterDeleter, chainID ids.ID, amount uint64) error

func Flatten

func Flatten[T any](slices ...[]T) []T

func GetBalance

func GetBalance(db database.KeyValueReader, address ids.ShortID, chainID ids.ID) (uint64, error)

func GetBlock

func GetBlock(db database.KeyValueReader, blkID ids.ID) ([]byte, error)

func GetBlockIDByHeight

func GetBlockIDByHeight(db database.KeyValueReader, height uint64) (ids.ID, error)

func GetLastAccepted

func GetLastAccepted(db database.KeyValueReader) (ids.ID, error)

func GetLoan

func GetLoan(db database.KeyValueReader, chainID ids.ID) (uint64, error)

func GetMessage

func GetMessage(db database.KeyValueReader, txID ids.ID) (*warp.UnsignedMessage, error)

func GetNonce

func GetNonce(db database.KeyValueReader, address ids.ShortID) (uint64, error)

func HasLoanID

func HasLoanID(db database.KeyValueReader, chainID ids.ID, loanID ids.ID) (bool, error)

func IncreaseBalance

func IncreaseBalance(db database.KeyValueReaderWriterDeleter, address ids.ShortID, chainID ids.ID, amount uint64) error

func IncreaseLoan

func IncreaseLoan(db database.KeyValueReaderWriterDeleter, chainID ids.ID, amount uint64) error

func IncrementNonce

func IncrementNonce(db database.KeyValueReaderWriter, address ids.ShortID, nonce uint64) error

func IsInitialized

func IsInitialized(db database.KeyValueReader) (bool, error)

func SetBalance

func SetBalance(db database.KeyValueWriterDeleter, address ids.ShortID, chainID ids.ID, balance uint64) error

func SetInitialized

func SetInitialized(db database.KeyValueWriter) error

func SetLastAccepted

func SetLastAccepted(db database.KeyValueWriter, blkID ids.ID) error

func SetLoan

func SetLoan(db database.KeyValueWriterDeleter, chainID ids.ID, balance uint64) error

func SetMessage

func SetMessage(db database.KeyValueWriter, txID ids.ID, message *warp.UnsignedMessage) error

func SetNonce

func SetNonce(db database.KeyValueWriter, address ids.ShortID, nonce uint64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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