Documentation
¶
Index ¶
- type BlockStore
- func (bs *BlockStore) Close()
- func (cs *BlockStore) GetBTCMoveLogPageData(page int) ([]*stores.SatoshiGenesis, error)
- func (cs *BlockStore) GetBTCMoveLogTotalPage() (int, error)
- func (cs *BlockStore) LoadValidatedSatoshiGenesis(trsno int64) (*stores.SatoshiGenesis, bool)
- func (bs *BlockStore) ReadBlockBytesByHash(blockhash fields.Hash) ([]byte, error)
- func (bs *BlockStore) ReadBlockBytesByHeight(blockheight uint64) (fields.Hash, []byte, error)
- func (bs *BlockStore) ReadBlockHashByHeight(blockheight uint64) (fields.Hash, error)
- func (bs *BlockStore) ReadDiamond(name fields.DiamondName) (*stores.DiamondSmelt, error)
- func (bs *BlockStore) ReadDiamondByNumber(number uint32) (*stores.DiamondSmelt, error)
- func (bs *BlockStore) ReadDiamondNameByNumber(number uint32) (fields.DiamondName, error)
- func (bs *BlockStore) ReadLastBlockHeight() (uint64, error)
- func (bc *BlockStore) RunDownLoadBTCMoveLog()
- func (cs *BlockStore) SaveBTCMoveLogPageData(svpage int, list []*stores.SatoshiGenesis) error
- func (bs *BlockStore) SaveBlock(fullblock interfaces.Block) error
- func (bs *BlockStore) SaveDiamond(diaobj *stores.DiamondSmelt) error
- func (bs *BlockStore) UpdateSetBlockHashReferToHeight(blockheight uint64, blockhash fields.Hash) error
- func (bs *BlockStore) UpdateSetDiamondNameReferToNumber(number uint32, dianame fields.DiamondName) error
- type BlockStoreConfig
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 (*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
Click to show internal directories.
Click to hide internal directories.