db

package
v0.0.0-...-b49069d Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_NUM = 1000

Variables

View Source
var (
	BKTCheck = []byte("Check")
	BKTRetry = []byte("Retry")
	BKTUtxo  = []byte("Utxo")

	BKTNeoRetry = []byte("NeoRetry")

	BKTHeight     = []byte("Height")
	BKTHeader     = []byte("Header")     // bucket header
	BKTHeightList = []byte("HeightList") // bucket header height list
)

Functions

This section is empty.

Types

type BoltDB

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

func NewBoltDB

func NewBoltDB(filePath string) (*BoltDB, error)

func (*BoltDB) Close

func (w *BoltDB) Close()

func (*BoltDB) DeleteCheck

func (w *BoltDB) DeleteCheck(txHash string) error

func (*BoltDB) DeleteNeoRetry

func (w *BoltDB) DeleteNeoRetry(k []byte) error

func (*BoltDB) DeleteRetry

func (w *BoltDB) DeleteRetry(k []byte) error

func (*BoltDB) GetAllCheck

func (w *BoltDB) GetAllCheck() (map[string][]byte, error)

func (*BoltDB) GetAllNeoRetry

func (w *BoltDB) GetAllNeoRetry() ([][]byte, error)

func (*BoltDB) GetAllRetry

func (w *BoltDB) GetAllRetry() ([][]byte, error)

func (*BoltDB) GetHeader

func (w *BoltDB) GetHeader(height uint32) ([]byte, error)

func (*BoltDB) GetHeadersByRange

func (w *BoltDB) GetHeadersByRange(low uint32, high uint32) (map[uint32][]byte, error)

func (*BoltDB) GetHeightList

func (w *BoltDB) GetHeightList() ([]uint32, error)

func (*BoltDB) GetUtxo

func (w *BoltDB) GetUtxo(k []byte) (*bool, error)

func (*BoltDB) PutCheck

func (w *BoltDB) PutCheck(txHash string, v []byte) error

func (*BoltDB) PutHeader

func (w *BoltDB) PutHeader(height uint32, rawHeader []byte) error

func (*BoltDB) PutHeightList

func (w *BoltDB) PutHeightList(heights []uint32) error

func (*BoltDB) PutNeoRetry

func (w *BoltDB) PutNeoRetry(k []byte) error

func (*BoltDB) PutRetry

func (w *BoltDB) PutRetry(k []byte) error

func (*BoltDB) PutUtxo

func (w *BoltDB) PutUtxo(k []byte, isSpent bool) error

func (*BoltDB) PutValueInHeightList

func (w *BoltDB) PutValueInHeightList(height uint32) error

type NeoUtxo

type NeoUtxo struct {
	TxId  string
	Index int
}

func (*NeoUtxo) Deserialization

func (this *NeoUtxo) Deserialization(source *common.ZeroCopySource) error

func (*NeoUtxo) Serialization

func (this *NeoUtxo) Serialization(sink *common.ZeroCopySink)

type Retry

type Retry struct {
	Height uint32
	Key    string
}

func (*Retry) Deserialization

func (this *Retry) Deserialization(source *common.ZeroCopySource) error

func (*Retry) Serialization

func (this *Retry) Serialization(sink *common.ZeroCopySink)

Jump to

Keyboard shortcuts

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