Documentation ¶
Index ¶
- type DebugStore
- func (d *DebugStore) ArchiveBlock(archiveHeight uint64) error
- func (d *DebugStore) BeginDbTransaction(txName string) (protocol.SqlDBTransaction, error)
- func (d *DebugStore) BlockExists(blockHash []byte) (bool, error)
- func (d *DebugStore) Close() error
- func (d *DebugStore) CommitDbTransaction(txName string) error
- func (d *DebugStore) CreateDatabase(contractName string) error
- func (d *DebugStore) DropDatabase(contractName string) error
- func (d *DebugStore) ExecDdlSql(contractName, sql, version string) error
- func (d *DebugStore) GetAccountTxHistory(accountId []byte) (protocol.TxHistoryIterator, error)
- func (d *DebugStore) GetArchivedPivot() uint64
- func (d *DebugStore) GetBlock(height uint64) (*commonPb.Block, error)
- func (d *DebugStore) GetBlockByHash(blockHash []byte) (*commonPb.Block, error)
- func (d *DebugStore) GetBlockByTx(txId string) (*commonPb.Block, error)
- func (d *DebugStore) GetBlockHeaderByHeight(height uint64) (*commonPb.BlockHeader, error)
- func (d *DebugStore) GetBlockWithRWSets(height uint64) (*storePb.BlockWithRWSet, error)
- func (d *DebugStore) GetContractByName(name string) (*commonPb.Contract, error)
- func (d *DebugStore) GetContractBytecode(name string) ([]byte, error)
- func (d *DebugStore) GetContractDbName(contractName string) string
- func (d *DebugStore) GetContractTxHistory(contractName string) (protocol.TxHistoryIterator, error)
- func (d *DebugStore) GetDBHandle(dbName string) protocol.DBHandle
- func (d *DebugStore) GetDbTransaction(txName string) (protocol.SqlDBTransaction, error)
- func (d *DebugStore) GetHeightByHash(blockHash []byte) (uint64, error)
- func (d *DebugStore) GetHistoryForKey(contractName string, key []byte) (protocol.KeyHistoryIterator, error)
- func (d *DebugStore) GetLastBlock() (*commonPb.Block, error)
- func (d *DebugStore) GetLastChainConfig() (*configPb.ChainConfig, error)
- func (d *DebugStore) GetLastConfigBlock() (*commonPb.Block, error)
- func (d *DebugStore) GetMemberExtraData(member *acPb.Member) (*acPb.MemberExtraData, error)
- func (d *DebugStore) GetTx(txId string) (*commonPb.Transaction, error)
- func (d *DebugStore) GetTxConfirmedTime(txId string) (int64, error)
- func (d *DebugStore) GetTxHeight(txId string) (uint64, error)
- func (d *DebugStore) GetTxInfoOnly(txId string) (*commonPb.TransactionInfo, error)
- func (d *DebugStore) GetTxInfoWithRWSet(txId string) (*commonPb.TransactionInfoWithRWSet, error)
- func (d *DebugStore) GetTxRWSet(txId string) (*commonPb.TxRWSet, error)
- func (d *DebugStore) GetTxRWSetsByHeight(height uint64) ([]*commonPb.TxRWSet, error)
- func (d *DebugStore) GetTxWithInfo(txId string) (*commonPb.TransactionInfo, error)
- func (d *DebugStore) GetTxWithRWSet(txId string) (*commonPb.TransactionWithRWSet, error)
- func (d *DebugStore) InitGenesis(genesisBlock *storePb.BlockWithRWSet) error
- func (d *DebugStore) PutBlock(block *commonPb.Block, txRWSets []*commonPb.TxRWSet) error
- func (d *DebugStore) QueryMulti(contractName, sql string, values ...interface{}) (protocol.SqlRows, error)
- func (d *DebugStore) QuerySingle(contractName, sql string, values ...interface{}) (protocol.SqlRow, error)
- func (d *DebugStore) ReadObject(contractName string, key []byte) ([]byte, error)
- func (d *DebugStore) RestoreBlocks(serializedBlocks [][]byte) error
- func (d *DebugStore) RollbackDbTransaction(txName string) error
- func (d *DebugStore) SelectObject(contractName string, startKey []byte, limit []byte) (protocol.StateIterator, error)
- func (d *DebugStore) TxExists(txId string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebugStore ¶
type DebugStore struct {
// contains filtered or unexported fields
}
DebugStore 本实现是用于避开存储模块的内存、CPU和IO的影响的情况下,提供最模拟的基本区块写入,读取等。不能安装合约,写入状态。
func NewDebugStore ¶
func NewDebugStore(l protocol.Logger, config *conf.StorageConfig, db protocol.DBHandle) *DebugStore
func (*DebugStore) ArchiveBlock ¶
func (d *DebugStore) ArchiveBlock(archiveHeight uint64) error
func (*DebugStore) BeginDbTransaction ¶
func (d *DebugStore) BeginDbTransaction(txName string) (protocol.SqlDBTransaction, error)
func (*DebugStore) BlockExists ¶
func (d *DebugStore) BlockExists(blockHash []byte) (bool, error)
func (*DebugStore) Close ¶
func (d *DebugStore) Close() error
func (*DebugStore) CommitDbTransaction ¶
func (d *DebugStore) CommitDbTransaction(txName string) error
func (*DebugStore) CreateDatabase ¶
func (d *DebugStore) CreateDatabase(contractName string) error
func (*DebugStore) DropDatabase ¶
func (d *DebugStore) DropDatabase(contractName string) error
func (*DebugStore) ExecDdlSql ¶
func (d *DebugStore) ExecDdlSql(contractName, sql, version string) error
func (*DebugStore) GetAccountTxHistory ¶
func (d *DebugStore) GetAccountTxHistory(accountId []byte) (protocol.TxHistoryIterator, error)
func (*DebugStore) GetArchivedPivot ¶
func (d *DebugStore) GetArchivedPivot() uint64
func (*DebugStore) GetBlockByHash ¶
func (d *DebugStore) GetBlockByHash(blockHash []byte) (*commonPb.Block, error)
func (*DebugStore) GetBlockByTx ¶
func (d *DebugStore) GetBlockByTx(txId string) (*commonPb.Block, error)
func (*DebugStore) GetBlockHeaderByHeight ¶
func (d *DebugStore) GetBlockHeaderByHeight(height uint64) (*commonPb.BlockHeader, error)
func (*DebugStore) GetBlockWithRWSets ¶
func (d *DebugStore) GetBlockWithRWSets(height uint64) (*storePb.BlockWithRWSet, error)
func (*DebugStore) GetContractByName ¶
func (d *DebugStore) GetContractByName(name string) (*commonPb.Contract, error)
func (*DebugStore) GetContractBytecode ¶
func (d *DebugStore) GetContractBytecode(name string) ([]byte, error)
func (*DebugStore) GetContractDbName ¶
func (d *DebugStore) GetContractDbName(contractName string) string
func (*DebugStore) GetContractTxHistory ¶
func (d *DebugStore) GetContractTxHistory(contractName string) (protocol.TxHistoryIterator, error)
func (*DebugStore) GetDBHandle ¶
func (d *DebugStore) GetDBHandle(dbName string) protocol.DBHandle
func (*DebugStore) GetDbTransaction ¶
func (d *DebugStore) GetDbTransaction(txName string) (protocol.SqlDBTransaction, error)
func (*DebugStore) GetHeightByHash ¶
func (d *DebugStore) GetHeightByHash(blockHash []byte) (uint64, error)
func (*DebugStore) GetHistoryForKey ¶
func (d *DebugStore) GetHistoryForKey(contractName string, key []byte) (protocol.KeyHistoryIterator, error)
func (*DebugStore) GetLastBlock ¶
func (d *DebugStore) GetLastBlock() (*commonPb.Block, error)
func (*DebugStore) GetLastChainConfig ¶
func (d *DebugStore) GetLastChainConfig() (*configPb.ChainConfig, error)
func (*DebugStore) GetLastConfigBlock ¶
func (d *DebugStore) GetLastConfigBlock() (*commonPb.Block, error)
func (*DebugStore) GetMemberExtraData ¶
func (d *DebugStore) GetMemberExtraData(member *acPb.Member) (*acPb.MemberExtraData, error)
func (*DebugStore) GetTx ¶
func (d *DebugStore) GetTx(txId string) (*commonPb.Transaction, error)
func (*DebugStore) GetTxConfirmedTime ¶
func (d *DebugStore) GetTxConfirmedTime(txId string) (int64, error)
func (*DebugStore) GetTxHeight ¶
func (d *DebugStore) GetTxHeight(txId string) (uint64, error)
func (*DebugStore) GetTxInfoOnly ¶
func (d *DebugStore) GetTxInfoOnly(txId string) (*commonPb.TransactionInfo, error)
func (*DebugStore) GetTxInfoWithRWSet ¶
func (d *DebugStore) GetTxInfoWithRWSet(txId string) (*commonPb.TransactionInfoWithRWSet, error)
GetTxInfoWithRWSet return tx and tx info and rw set
func (*DebugStore) GetTxRWSet ¶
func (d *DebugStore) GetTxRWSet(txId string) (*commonPb.TxRWSet, error)
func (*DebugStore) GetTxRWSetsByHeight ¶
func (d *DebugStore) GetTxRWSetsByHeight(height uint64) ([]*commonPb.TxRWSet, error)
func (*DebugStore) GetTxWithInfo ¶
func (d *DebugStore) GetTxWithInfo(txId string) (*commonPb.TransactionInfo, error)
func (*DebugStore) GetTxWithRWSet ¶
func (d *DebugStore) GetTxWithRWSet(txId string) (*commonPb.TransactionWithRWSet, error)
GetTxWithRWSet return tx and it's rw set
func (*DebugStore) InitGenesis ¶
func (d *DebugStore) InitGenesis(genesisBlock *storePb.BlockWithRWSet) error
func (*DebugStore) PutBlock ¶
func (*DebugStore) QueryMulti ¶
func (d *DebugStore) QueryMulti(contractName, sql string, values ...interface{}) (protocol.SqlRows, error)
func (*DebugStore) QuerySingle ¶
func (d *DebugStore) QuerySingle(contractName, sql string, values ...interface{}) (protocol.SqlRow, error)
func (*DebugStore) ReadObject ¶
func (d *DebugStore) ReadObject(contractName string, key []byte) ([]byte, error)
func (*DebugStore) RestoreBlocks ¶
func (d *DebugStore) RestoreBlocks(serializedBlocks [][]byte) error
func (*DebugStore) RollbackDbTransaction ¶
func (d *DebugStore) RollbackDbTransaction(txName string) error
func (*DebugStore) SelectObject ¶
func (d *DebugStore) SelectObject(contractName string, startKey []byte, limit []byte) (protocol.StateIterator, error)
func (*DebugStore) TxExists ¶
func (d *DebugStore) TxExists(txId string) (bool, error)
Click to show internal directories.
Click to hide internal directories.