ledger

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2018 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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 NewLedger

func NewLedger(dataDir string) (*Ledger, error)

func (*Ledger) AddBlock

func (self *Ledger) AddBlock(block *types.Block) error

func (*Ledger) AddHeaders

func (self *Ledger) AddHeaders(headers []*types.Header) error

func (*Ledger) Close

func (self *Ledger) Close() error

func (*Ledger) GetBlockByHash

func (self *Ledger) GetBlockByHash(blockHash common.Uint256) (*types.Block, error)

func (*Ledger) GetBlockByHeight

func (self *Ledger) GetBlockByHeight(height uint32) (*types.Block, error)

func (*Ledger) GetBlockHash

func (self *Ledger) GetBlockHash(height uint32) common.Uint256

func (*Ledger) GetBlockRootWithNewTxRoot

func (self *Ledger) GetBlockRootWithNewTxRoot(txRoot common.Uint256) common.Uint256

func (*Ledger) GetBookkeeperState

func (self *Ledger) GetBookkeeperState() (*states.BookkeeperState, error)

func (*Ledger) GetContractState

func (self *Ledger) GetContractState(contractHash common.Address) (*payload.DeployCode, error)

func (*Ledger) GetCurrentBlockHash

func (self *Ledger) GetCurrentBlockHash() common.Uint256

func (*Ledger) GetCurrentBlockHeight

func (self *Ledger) GetCurrentBlockHeight() uint32

func (*Ledger) GetCurrentHeaderHash

func (self *Ledger) GetCurrentHeaderHash() common.Uint256

func (*Ledger) GetCurrentHeaderHeight

func (self *Ledger) GetCurrentHeaderHeight() uint32

func (*Ledger) GetCurrentStateRoot

func (self *Ledger) GetCurrentStateRoot() (common.Uint256, error)

func (*Ledger) GetEventNotifyByBlock

func (self *Ledger) GetEventNotifyByBlock(height uint32) ([]*event.ExecuteNotify, error)

func (*Ledger) GetEventNotifyByTx

func (self *Ledger) GetEventNotifyByTx(tx common.Uint256) (*event.ExecuteNotify, error)

func (*Ledger) GetHeaderByHash

func (self *Ledger) GetHeaderByHash(blockHash common.Uint256) (*types.Header, error)

func (*Ledger) GetHeaderByHeight

func (self *Ledger) GetHeaderByHeight(height uint32) (*types.Header, error)

func (*Ledger) GetMerkleProof

func (self *Ledger) GetMerkleProof(proofHeight, rootHeight uint32) ([]common.Uint256, error)

func (*Ledger) GetStorageItem

func (self *Ledger) GetStorageItem(codeHash common.Address, key []byte) ([]byte, error)

func (*Ledger) GetStore

func (self *Ledger) GetStore() store.LedgerStore

func (*Ledger) GetTransaction

func (self *Ledger) GetTransaction(txHash common.Uint256) (*types.Transaction, error)

func (*Ledger) GetTransactionWithHeight

func (self *Ledger) GetTransactionWithHeight(txHash common.Uint256) (*types.Transaction, uint32, error)

func (*Ledger) Init

func (self *Ledger) Init(defaultBookkeeper []keypair.PublicKey, genesisBlock *types.Block) error

func (*Ledger) IsContainBlock

func (self *Ledger) IsContainBlock(blockHash common.Uint256) (bool, error)

func (*Ledger) IsContainTransaction

func (self *Ledger) IsContainTransaction(txHash common.Uint256) (bool, error)

func (*Ledger) PreExecuteContract

func (self *Ledger) PreExecuteContract(tx *types.Transaction) (*cstate.PreExecResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL