Documentation ¶
Overview ¶
Package rawdb contains a collection of low level database accessors.
Index ¶
- Constants
- Variables
- func DisableLog()
- func UseLogger(logger elalog.Logger)
- type CacheCodeTable
- type LedgerStore
- func (c *LedgerStore) Close() error
- func (c *LedgerStore) DeleteTxLookupEntry(hash common.Uint256) error
- func (c *LedgerStore) GetAccount(programHash *common.Uint168) (*states.AccountState, error)
- func (c *LedgerStore) GetBlock(hash common.Uint256) (*side.Block, error)
- func (c *LedgerStore) GetContract(codeHash *common.Uint168) ([]byte, error)
- func (s *LedgerStore) GetHeader(hash common.Uint256) (interfaces.Header, error)
- func (c *LedgerStore) GetReceipts(height uint32, hash *common.Uint256) (types.Receipts, error)
- func (c *LedgerStore) GetTxLookupEntry(hash common.Uint256) common.Uint256
- func (c *LedgerStore) GetUnspents(txid common.Uint256) ([]*side.Output, error)
- func (c *LedgerStore) PersisAccount(batch database.Batch, block *side.Block) error
- func (c *LedgerStore) PersisInvokeTransaction(block *side.Block, tx *side.Transaction, batch database.Batch) (*types.Receipt, error)
- func (c *LedgerStore) PersistDeployTransaction(block *side.Block, tx *side.Transaction, batch database.Batch) error
- func (c *LedgerStore) ReadTransaction(hash common.Uint256) (*side.Transaction, common.Uint256, uint32, uint32)
- func (c *LedgerStore) WriteReceipts(block *side.Block, receipts types.Receipts) error
- func (c *LedgerStore) WriteTxLookupEntries(block *side.Block)
- type ResponseExt
Constants ¶
View Source
const AccountPersisFlag = "AccountPersisFlag"
View Source
const DEPLOY_TRANSACTION = "DeployTransaction"
View Source
const INVOKE_TRANSACTION = "InvokeTransaction"
View Source
const (
PersisAccount blockchain.StoreFuncName = "PersisAccount"
)
View Source
const RunTime_Log = "RunTime_Log"
View Source
const RunTime_Notify = "RunTime_Notify"
Variables ¶
View Source
var (
ErrDBNotFound = errors.New("leveldb: not found")
)
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
Types ¶
type CacheCodeTable ¶
type CacheCodeTable struct {
// contains filtered or unexported fields
}
func NewCacheCodeTable ¶
func NewCacheCodeTable(dbCache *blockchain.DBCache) *CacheCodeTable
func (*CacheCodeTable) GetScript ¶
func (table *CacheCodeTable) GetScript(codeHash []byte) []byte
func (*CacheCodeTable) GetTxReference ¶
func (table *CacheCodeTable) GetTxReference(tx *interfaces.IDataContainer) (map[*types.Input]*types.Output, error)
type LedgerStore ¶
type LedgerStore struct {
*sb.ChainStore
}
func NewLedgerStore ¶
func NewLedgerStore(store *sb.ChainStore) (*LedgerStore, error)
func (*LedgerStore) Close ¶
func (c *LedgerStore) Close() error
func (*LedgerStore) DeleteTxLookupEntry ¶
func (c *LedgerStore) DeleteTxLookupEntry(hash common.Uint256) error
DeleteTxLookupEntry removes all transaction data associated with a hash.
func (*LedgerStore) GetAccount ¶
func (c *LedgerStore) GetAccount(programHash *common.Uint168) (*states.AccountState, error)
func (*LedgerStore) GetContract ¶
func (c *LedgerStore) GetContract(codeHash *common.Uint168) ([]byte, error)
func (*LedgerStore) GetHeader ¶
func (s *LedgerStore) GetHeader(hash common.Uint256) (interfaces.Header, error)
func (*LedgerStore) GetReceipts ¶
func (*LedgerStore) GetTxLookupEntry ¶
func (c *LedgerStore) GetTxLookupEntry(hash common.Uint256) common.Uint256
ReadTxLookupEntry retrieves the positional metadata associated with a transaction hash to allow retrieving the transaction or receipt by hash.
func (*LedgerStore) GetUnspents ¶
func (*LedgerStore) PersisAccount ¶
func (*LedgerStore) PersisInvokeTransaction ¶
func (c *LedgerStore) PersisInvokeTransaction(block *side.Block, tx *side.Transaction, batch database.Batch) (*types.Receipt, error)
func (*LedgerStore) PersistDeployTransaction ¶
func (c *LedgerStore) PersistDeployTransaction(block *side.Block, tx *side.Transaction, batch database.Batch) error
func (*LedgerStore) ReadTransaction ¶
func (c *LedgerStore) ReadTransaction(hash common.Uint256) (*side.Transaction, common.Uint256, uint32, uint32)
ReadTransaction retrieves a specific transaction from the database, along with its added positional metadata.
func (*LedgerStore) WriteReceipts ¶
func (*LedgerStore) WriteTxLookupEntries ¶
func (c *LedgerStore) WriteTxLookupEntries(block *side.Block)
WriteTxLookupEntries stores a positional metadata for every transaction from a block, enabling hash based transaction and receipt lookups.
Click to show internal directories.
Click to hide internal directories.