Versions in this module Expand all Collapse all v3 v3.0.1 Dec 28, 2023 v3.0.0 Dec 23, 2022 Changes in this version + type BlockInfo struct + AdditionalData []byte + BlockHash []byte + BlockHeight uint64 + BlockTimestamp int64 + BlockType int + BlockVersion uint32 + ChainId string + ConsensusArgs []byte + Dag []byte + DagHash []byte + PreBlockHash []byte + PreConfHeight uint64 + ProposerMemberInfo []byte + ProposerMemberType int + ProposerOrgId string + ProposerSA uint32 + RwSetRoot []byte + Signature []byte + TxCount uint32 + TxIds string + TxRoot []byte + func ConvertHeader2BlockInfo(header *commonPb.BlockHeader) *BlockInfo + func NewBlockInfo(block *commonPb.Block) (*BlockInfo, error) + func (b *BlockInfo) GetBlock() (*commonPb.Block, error) + func (b *BlockInfo) GetBlockHeader() *commonPb.BlockHeader + func (b *BlockInfo) GetCountSql() (string, []interface{}) + func (b *BlockInfo) GetCreateTableSql(dbType string) string + func (b *BlockInfo) GetFilteredBlock() (*storePb.SerializedBlock, error) + func (b *BlockInfo) GetInsertSql(dbType string) (string, []interface{}) + func (b *BlockInfo) GetTableName() string + func (b *BlockInfo) GetTxList() ([]string, error) + func (b *BlockInfo) GetUpdateSql() (string, []interface{}) + func (b *BlockInfo) ScanObject(scan func(dest ...interface{}) error) error + type BlockSqlDB struct + func NewBlockSqlDB(dbName string, db protocol.SqlDBHandle, logger protocol.Logger) *BlockSqlDB + func (b *BlockSqlDB) BlockExists(blockHash []byte) (bool, error) + func (b *BlockSqlDB) Close() + func (b *BlockSqlDB) CommitBlock(blocksInfo *serialization.BlockWithSerializedInfo, isCache bool) error + func (b *BlockSqlDB) ConfigBlockImport(block *commonPb.Block) error + func (b *BlockSqlDB) GetBlock(height uint64) (*commonPb.Block, error) + func (b *BlockSqlDB) GetBlockByHash(blockHash []byte) (*commonPb.Block, error) + func (b *BlockSqlDB) GetBlockByTx(txId string) (*commonPb.Block, error) + func (b *BlockSqlDB) GetBlockIndex(height uint64) (*storePb.StoreInfo, error) + func (b *BlockSqlDB) GetBlockMetaIndex(height uint64) (*storePb.StoreInfo, error) + func (b *BlockSqlDB) GetFilteredBlock(height uint64) (*storePb.SerializedBlock, error) + func (b *BlockSqlDB) GetLastBlock() (*commonPb.Block, error) + func (b *BlockSqlDB) GetLastConfigBlock() (*commonPb.Block, error) + func (b *BlockSqlDB) GetLastConfigBlockHeight() (uint64, error) + func (b *BlockSqlDB) GetLastSavepoint() (uint64, error) + func (b *BlockSqlDB) GetTx(txId string) (*commonPb.Transaction, error) + func (b *BlockSqlDB) GetTxConfirmedTime(txId string) (int64, error) + func (b *BlockSqlDB) GetTxIndex(txId string) (*storePb.StoreInfo, error) + func (b *BlockSqlDB) GetTxInfoOnly(txId string) (*storePb.TransactionStoreInfo, error) + func (b *BlockSqlDB) GetTxWithBlockInfo(txId string) (*storePb.TransactionStoreInfo, error) + func (b *BlockSqlDB) GetTxidSet() ([]protocol.Iterator, error) + func (b *BlockSqlDB) ImportSetSavePoint(height uint64) error + func (b *BlockSqlDB) ImportTxID(key, value []byte) error + func (b *BlockSqlDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error + func (b *BlockSqlDB) TxExists(txId string) (bool, error) + func (db *BlockSqlDB) GetArchivedPivot() (uint64, error) + func (db *BlockSqlDB) GetBlockHeaderByHeight(height uint64) (*commonPb.BlockHeader, error) + func (db *BlockSqlDB) GetHeightByHash(blockHash []byte) (uint64, error) + func (db *BlockSqlDB) GetTxHeight(txId string) (uint64, error) + func (db *BlockSqlDB) RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error + func (db *BlockSqlDB) ShrinkBlocks(startHeight uint64, endHeight uint64) (map[uint64][]string, error) + func (db *BlockSqlDB) TxArchived(txId string) (bool, error) + type TxInfo struct + BlockHash []byte + BlockHeight uint64 + ChainId string + ContractEvents string + ContractName string + ContractResultCode uint32 + Endorsers string + ExpirationTime int64 + GasUsed uint64 + Limit *commonPb.Limit + Message string + Method string + Offset uint32 + Parameters []byte + ResultData []byte + ResultMessage string + RwSetHash []byte + SenderMemberInfo []byte + SenderMemberType int + SenderOrgId string + SenderSignature []byte + Sequence uint64 + Timestamp int64 + TxId string + TxStatusCode int32 + TxType int32 + func NewTxInfo(tx *commonPb.Transaction, blockHeight uint64, blockHash []byte, offset uint32) (*TxInfo, error) + func (b *TxInfo) GetCountSql() (string, []interface{}) + func (t *TxInfo) GetCreateTableSql(dbType string) string + func (t *TxInfo) GetInsertSql(dbType string) (string, []interface{}) + func (t *TxInfo) GetTableName() string + func (t *TxInfo) GetTx() (*commonPb.Transaction, error) + func (t *TxInfo) GetTxInfo() (*storePb.TransactionStoreInfo, error) + func (t *TxInfo) GetUpdateSql() (string, []interface{}) + func (t *TxInfo) ScanObject(scan func(dest ...interface{}) error) error