storage

package
v0.0.0-...-a0a9112 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BlockBucketName = []byte("blocks")
	TxBucketName    = []byte("txs")

	// state buckets
	Num2AccBucketName  = []byte("num:acc")
	Addr2BalBucketName = []byte("addr:bal")
	Addr2NumBucketName = []byte("addr:num")
)
View Source
var (
	LatestHeightTag = []byte("latest:height")
	LatestHashTag   = []byte("latest:hash")
	OriginHeightTag = []byte("origin:height") // store the origin block
	OriginHashTag   = []byte("origin:hash")
)
View Source
var ErrKeyNotFound = errors.New("key not found")

Functions

func InitDB

func InitDB(db *bbolt.DB)

func InitStorage

func InitStorage(network tnmtypes.Network, dbFolder string) *bbolt.DB

InitStorage inits a new DB in data folder.

func InitTempStorage

func InitTempStorage() *bbolt.DB

Types

This section is empty.

Jump to

Keyboard shortcuts

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