blockstorev3

package
v0.0.0-...-03c569e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStore

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

func NewBlockStore

func NewBlockStore(cnf *BlockStoreConfig) (*BlockStore, error)

func (*BlockStore) Close

func (bs *BlockStore) Close()

func (*BlockStore) GetBTCMoveLogPageData

func (cs *BlockStore) GetBTCMoveLogPageData(page int) ([]*stores.SatoshiGenesis, error)

Get data page

func (*BlockStore) GetBTCMoveLogTotalPage

func (cs *BlockStore) GetBTCMoveLogTotalPage() (int, error)

Number of data pages, 100 pieces of data per page

func (*BlockStore) LoadValidatedSatoshiGenesis

func (cs *BlockStore) LoadValidatedSatoshiGenesis(trsno int64) (*stores.SatoshiGenesis, bool)

Get the verified BTC transfer log, return the obtained content and whether verification is required

func (*BlockStore) ReadBlockBytesByHash

func (bs *BlockStore) ReadBlockBytesByHash(blockhash fields.Hash) ([]byte, error)

func (*BlockStore) ReadBlockBytesByHeight

func (bs *BlockStore) ReadBlockBytesByHeight(blockheight uint64) (fields.Hash, []byte, error)

func (*BlockStore) ReadBlockHashByHeight

func (bs *BlockStore) ReadBlockHashByHeight(blockheight uint64) (fields.Hash, error)

func (*BlockStore) ReadDiamond

func (bs *BlockStore) ReadDiamond(name fields.DiamondName) (*stores.DiamondSmelt, error)

func (*BlockStore) ReadDiamondByNumber

func (bs *BlockStore) ReadDiamondByNumber(number uint32) (*stores.DiamondSmelt, error)

func (*BlockStore) ReadDiamondNameByNumber

func (bs *BlockStore) ReadDiamondNameByNumber(number uint32) (fields.DiamondName, error)

func (*BlockStore) ReadLastBlockHeight

func (bs *BlockStore) ReadLastBlockHeight() (uint64, error)

func (*BlockStore) RunDownLoadBTCMoveLog

func (bc *BlockStore) RunDownLoadBTCMoveLog()

Download bitcoin one-way transfer records

func (*BlockStore) SaveBTCMoveLogPageData

func (cs *BlockStore) SaveBTCMoveLogPageData(svpage int, list []*stores.SatoshiGenesis) error

Save data page

func (*BlockStore) SaveBlock

func (bs *BlockStore) SaveBlock(fullblock interfaces.Block) error

func (*BlockStore) SaveDiamond

func (bs *BlockStore) SaveDiamond(diaobj *stores.DiamondSmelt) error

func (*BlockStore) UpdateSetBlockHashReferToHeight

func (bs *BlockStore) UpdateSetBlockHashReferToHeight(blockheight uint64, blockhash fields.Hash) error

func (*BlockStore) UpdateSetDiamondNameReferToNumber

func (bs *BlockStore) UpdateSetDiamondNameReferToNumber(number uint32, dianame fields.DiamondName) error

Set the diamond name pointed by the diamond number

type BlockStoreConfig

type BlockStoreConfig struct {
	Datadir string

	// btc move
	BTCMoveCheckEnable    bool
	DownloadBTCMoveLogUrl string
}

func NewBlockStoreConfig

func NewBlockStoreConfig(cnffile *sys.Inicnf) *BlockStoreConfig

func NewEmptyBlockStoreConfig

func NewEmptyBlockStoreConfig() *BlockStoreConfig

Jump to

Keyboard shortcuts

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