Documentation ¶
Index ¶
- type Ledger
- 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) GetGlobalStateRoot(height uint32) (result common.Uint256, err 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) GetStoreProof(key []byte) ([]byte, []byte, uint32, error)
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
var DefLedger *Ledger
func (*Ledger) EnableBlockPrune ¶ added in v1.10.0
func (*Ledger) ExecuteBlock ¶ added in v1.6.0
func (*Ledger) GetBlockByHash ¶
func (*Ledger) GetBlockByHeight ¶
func (*Ledger) GetBlockRootWithNewTxRoots ¶ added in v1.6.0
func (*Ledger) GetBookkeeperState ¶
func (self *Ledger) GetBookkeeperState() (*states.BookkeeperState, error)
func (*Ledger) GetContractState ¶
func (*Ledger) GetCrossChainMsg ¶ added in v1.9.0
func (self *Ledger) GetCrossChainMsg(height uint32) (*types.CrossChainMsg, error)
func (*Ledger) GetCrossStatesProof ¶ added in v1.9.0
func (*Ledger) GetCrossStatesRoot ¶ added in v1.9.0
func (*Ledger) GetCurrentBlockHash ¶
func (*Ledger) GetCurrentBlockHeight ¶
func (*Ledger) GetCurrentHeaderHash ¶
func (*Ledger) GetCurrentHeaderHeight ¶
func (*Ledger) GetEventNotifyByBlock ¶
func (self *Ledger) GetEventNotifyByBlock(height uint32) ([]*event.ExecuteNotify, error)
func (*Ledger) GetEventNotifyByTx ¶
func (*Ledger) GetGlobalStateRoot ¶
func (*Ledger) GetHeaderByHash ¶
func (*Ledger) GetHeaderByHeight ¶
func (*Ledger) GetMerkleProof ¶
func (*Ledger) GetRawHeaderByHash ¶ added in v1.6.2
func (*Ledger) GetStateMerkleRoot ¶ added in v1.6.0
func (*Ledger) GetStorageItem ¶
func (*Ledger) GetStore ¶
func (self *Ledger) GetStore() store.LedgerStore
func (*Ledger) GetStoreProof ¶
func (*Ledger) GetTransaction ¶
func (*Ledger) GetTransactionWithHeight ¶
func (*Ledger) IsContainBlock ¶
func (*Ledger) IsContainTransaction ¶
func (*Ledger) PreExecuteContract ¶
func (self *Ledger) PreExecuteContract(tx *types.Transaction) (*cstate.PreExecResult, error)
func (*Ledger) PreExecuteContractBatch ¶ added in v1.8.1
func (self *Ledger) PreExecuteContractBatch(txes []*types.Transaction, atomic bool) ([]*cstate.PreExecResult, uint32, error)
func (*Ledger) SubmitBlock ¶ added in v1.6.0
func (self *Ledger) SubmitBlock(b *types.Block, crossChainMsg *types.CrossChainMsg, exec store.ExecuteResult) error
Click to show internal directories.
Click to hide internal directories.