db

package
v0.0.0-...-c0f8dde Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BKTRetry          = []byte("retry")
	BKTBtcLastHeight  = []byte("btclast")
	BKTPolyLastHeight = []byte("polylast")
	BKTTxNeedToRetry  = []byte("retrytx")
	KEYBtcLastHeight  = []byte("btclast")
	KEYPolyLastHeight = []byte("polylast")
	KEYMinHeight      = []byte{0x0}
)

Functions

This section is empty.

Types

type OverReadSizeErr

type OverReadSizeErr struct {
	Err error
}

func (OverReadSizeErr) Error

func (err OverReadSizeErr) Error() string

type RetryDB

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

func NewRetryDB

func NewRetryDB(filePath string, times, retryDuration int, maxReadSize uint64) (*RetryDB, error)

func (*RetryDB) Del

func (r *RetryDB) Del(k string) error

func (*RetryDB) GetAll

func (r *RetryDB) GetAll() ([]string, error)

func (*RetryDB) GetBtcHeight

func (r *RetryDB) GetBtcHeight() uint32

func (*RetryDB) GetCCI

func (r *RetryDB) GetCCI(height uint32) (utils.CrossChainItemArr, error)

func (*RetryDB) GetCCIUnderHeightAndDel

func (r *RetryDB) GetCCIUnderHeightAndDel(height uint32) ([]*utils.CrossChainItem, error)

func (*RetryDB) GetMinHeight

func (r *RetryDB) GetMinHeight() uint32

func (*RetryDB) GetPolyHeight

func (r *RetryDB) GetPolyHeight() uint32

func (*RetryDB) Put

func (r *RetryDB) Put(tx string) error

func (*RetryDB) PutCCI

func (r *RetryDB) PutCCI(item *utils.CrossChainItem) error

func (*RetryDB) SetBtcHeight

func (r *RetryDB) SetBtcHeight(height uint32) error

func (*RetryDB) SetPolyHeight

func (r *RetryDB) SetPolyHeight(height uint32) error

Jump to

Keyboard shortcuts

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