Versions in this module Expand all Collapse all v2 v2.0.1 Jul 5, 2020 Changes in this version + type Ledger struct + var DefLedger *Ledger + func NewLedger(dataDir string, stateHashHeight uint32) (*Ledger, error) + func (self *Ledger) AddBlock(block *types.Block, ccMsg *types.CrossChainMsg, stateMerkleRoot common.Uint256) error + func (self *Ledger) AddHeaders(headers []*types.Header) error + func (self *Ledger) Close() error + func (self *Ledger) EnableBlockPrune(numBeforeCurr uint32) + func (self *Ledger) ExecuteBlock(b *types.Block) (store.ExecuteResult, error) + func (self *Ledger) GetBlockByHash(blockHash common.Uint256) (*types.Block, error) + func (self *Ledger) GetBlockByHeight(height uint32) (*types.Block, error) + func (self *Ledger) GetBlockHash(height uint32) common.Uint256 + func (self *Ledger) GetBlockRootWithNewTxRoots(startHeight uint32, txRoots []common.Uint256) common.Uint256 + func (self *Ledger) GetBookkeeperState() (*states.BookkeeperState, error) + func (self *Ledger) GetContractState(contractHash common.Address) (*payload.DeployCode, error) + func (self *Ledger) GetCrossChainMsg(height uint32) (*types.CrossChainMsg, error) + func (self *Ledger) GetCrossStatesProof(height uint32, key []byte) ([]byte, error) + func (self *Ledger) GetCrossStatesRoot(height uint32) (common.Uint256, error) + func (self *Ledger) GetCurrentBlockHash() common.Uint256 + func (self *Ledger) GetCurrentBlockHeight() uint32 + func (self *Ledger) GetCurrentHeaderHash() common.Uint256 + func (self *Ledger) GetCurrentHeaderHeight() uint32 + func (self *Ledger) GetEventNotifyByBlock(height uint32) ([]*event.ExecuteNotify, error) + func (self *Ledger) GetEventNotifyByTx(tx common.Uint256) (*event.ExecuteNotify, error) + func (self *Ledger) GetHeaderByHash(blockHash common.Uint256) (*types.Header, error) + func (self *Ledger) GetHeaderByHeight(height uint32) (*types.Header, error) + func (self *Ledger) GetMerkleProof(proofHeight, rootHeight uint32) ([]common.Uint256, error) + func (self *Ledger) GetRawHeaderByHash(blockHash common.Uint256) (*types.RawHeader, error) + func (self *Ledger) GetStateMerkleRoot(height uint32) (result common.Uint256, err error) + func (self *Ledger) GetStorageItem(codeHash common.Address, key []byte) ([]byte, error) + func (self *Ledger) GetStore() store.LedgerStore + func (self *Ledger) GetTransaction(txHash common.Uint256) (*types.Transaction, error) + func (self *Ledger) GetTransactionWithHeight(txHash common.Uint256) (*types.Transaction, uint32, error) + func (self *Ledger) Init(defaultBookkeeper []keypair.PublicKey, genesisBlock *types.Block) error + func (self *Ledger) IsContainBlock(blockHash common.Uint256) (bool, error) + func (self *Ledger) IsContainTransaction(txHash common.Uint256) (bool, error) + func (self *Ledger) PreExecuteContract(tx *types.Transaction) (*cstate.PreExecResult, error) + func (self *Ledger) PreExecuteContractBatch(txes []*types.Transaction, atomic bool) ([]*cstate.PreExecResult, uint32, error) + func (self *Ledger) SubmitBlock(b *types.Block, crossChainMsg *types.CrossChainMsg, exec store.ExecuteResult) error