syncdb

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SegBits = 16
	SegLen  = 1 << SegBits
	SegMask = SegLen - 1
)

Variables

This section is empty.

Functions

func Padding64

func Padding64(length int) (n int)

make sure (length+n)%64 == 0

Types

type Int64Array

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

func NewInt64Array

func NewInt64Array() Int64Array

func (*Int64Array) Get

func (ia *Int64Array) Get(height int64) int64

func (*Int64Array) Set

func (ia *Int64Array) Set(height, pos int64)

type SyncDB

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

func NewSyncDB

func NewSyncDB(path string) *SyncDB

func (*SyncDB) AddBlock

func (db *SyncDB) AddBlock(height int64, blk *types.Block, txid2sigMap map[[32]byte][65]byte, updateOfADS map[string]string)

func (*SyncDB) Close

func (db *SyncDB) Close()

func (*SyncDB) Get

func (db *SyncDB) Get(height int64) []byte

func (*SyncDB) Set

func (db *SyncDB) Set(height int64, data []byte)

Jump to

Keyboard shortcuts

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