Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecuteResult ¶ added in v1.6.0
type LedgerStore ¶
type LedgerStore interface {
InitLedgerStoreWithGenesisBlock(genesisblock *types.Block, defaultBookkeeper []keypair.PublicKey) error
Close() error
AddHeaders(headers []*types.Header) error
AddBlock(block *types.Block, ccMsg *types.CrossChainMsg, stateMerkleRoot common.Uint256) error
ExecuteBlock(b *types.Block) (ExecuteResult, error) // called by consensus
SubmitBlock(b *types.Block, crossChainMsg *types.CrossChainMsg, exec ExecuteResult) error // called by consensus
GetStateMerkleRoot(height uint32) (result common.Uint256, err error)
GetCurrentBlockHash() common.Uint256
GetCurrentBlockHeight() uint32
GetCurrentHeaderHeight() uint32
GetFilterStart() uint32
GetIndexStore() *leveldbstore.LevelDBStore
GetCurrentHeaderHash() common.Uint256
GetBlockHash(height uint32) common.Uint256
GetHeaderByHash(blockHash common.Uint256) (*types.Header, error)
GetRawHeaderByHash(blockHash common.Uint256) (*types.RawHeader, error)
GetHeaderByHeight(height uint32) (*types.Header, error)
GetBlockByHash(blockHash common.Uint256) (*types.Block, error)
GetBlockByHeight(height uint32) (*types.Block, error)
GetTransaction(txHash common.Uint256) (*types.Transaction, uint32, error)
GetBloomData(height uint32) (types2.Bloom, error)
BloomStatus() (uint32, uint32)
IsContainBlock(blockHash common.Uint256) (bool, error)
IsContainTransaction(txHash common.Uint256) (bool, error)
GetBlockRootWithNewTxRoots(startHeight uint32, txRoots []common.Uint256) common.Uint256
GetMerkleProof(m, n uint32) ([]common.Uint256, error)
GetContractState(contractHash common.Address) (*payload.DeployCode, error)
GetBookkeeperState() (*states.BookkeeperState, error)
GetStorageItem(codeHash common.Address, key []byte) ([]byte, error)
PreExecuteContract(tx *types.Transaction) (*cstates.PreExecResult, error)
PreExecuteContractBatch(txes []*types.Transaction, atomic bool) ([]*cstates.PreExecResult, uint32, error)
PreExecuteEip155Tx(msg types2.Message) (*types3.ExecutionResult, error)
TraceEip155Tx(msg types2.Message, tracer evm.Tracer) (*types3.ExecutionResult, error)
GetEventNotifyByTx(tx common.Uint256) (*event.ExecuteNotify, error)
GetEventNotifyByBlock(height uint32) ([]*event.ExecuteNotify, error)
GetEthCode(hash common2.Hash) ([]byte, error)
GetEthState(address common2.Address, key common2.Hash) ([]byte, error)
GetEthAccount(address common2.Address) (*storage.EthAccount, error)
//cross chain states root
GetCrossStatesRoot(height uint32) (common.Uint256, error)
GetCrossStates(height uint32) ([]common.Uint256, error)
GetCrossChainMsg(height uint32) (*types.CrossChainMsg, error)
GetCrossStatesProof(height uint32, key []byte) ([]byte, error)
EnableBlockPrune(numBeforeCurr uint32)
//expose the cache db
GetCacheDB() *storage.CacheDB
}
LedgerStore provides func with store package.
Directories
¶
| Path | Synopsis |
|---|---|
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. |
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. |
Click to show internal directories.
Click to hide internal directories.