Documentation ¶
Index ¶
- type Ledger
- func (self *Ledger) AddBlock(block *types.Block, stateMerkleRoot common.Uint256) error
- func (self *Ledger) AddHeaders(headers []*types.Header) error
- func (self *Ledger) Close() error
- 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) GetBlockRootWithPreBlockHashes(startHeight uint32, txRoots []common.Uint256) common.Uint256
- func (self *Ledger) GetBookkeeperState() (*states.BookkeeperState, error)
- func (self *Ledger) GetCrossStateRoot(height uint32) (common.Uint256, error)
- func (self *Ledger) GetCrossStatesProof(height uint32, key []byte) ([]byte, 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) GetCurrentStateRoot() (common.Uint256, error)
- 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) ([]byte, 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) SubmitBlock(b *types.Block, 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) ExecuteBlock ¶ added in v1.2.0
func (*Ledger) GetBlockByHash ¶
func (*Ledger) GetBlockByHeight ¶
func (*Ledger) GetBlockRootWithPreBlockHashes ¶ added in v1.2.0
func (*Ledger) GetBookkeeperState ¶
func (self *Ledger) GetBookkeeperState() (*states.BookkeeperState, error)
func (*Ledger) GetCrossStateRoot ¶ added in v1.2.0
func (*Ledger) GetCrossStatesProof ¶ added in v1.2.0
func (*Ledger) GetCurrentBlockHash ¶
func (*Ledger) GetCurrentBlockHeight ¶
func (*Ledger) GetCurrentHeaderHash ¶
func (*Ledger) GetCurrentHeaderHeight ¶
func (*Ledger) GetCurrentStateRoot ¶
func (*Ledger) GetEventNotifyByBlock ¶
func (self *Ledger) GetEventNotifyByBlock(height uint32) ([]*event.ExecuteNotify, error)
func (*Ledger) GetEventNotifyByTx ¶
func (*Ledger) GetHeaderByHash ¶
func (*Ledger) GetHeaderByHeight ¶
func (*Ledger) GetMerkleProof ¶
func (*Ledger) GetStateMerkleRoot ¶ added in v1.2.0
func (*Ledger) GetStorageItem ¶
func (*Ledger) GetStore ¶
func (self *Ledger) GetStore() store.LedgerStore
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) SubmitBlock ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.