ledger

package
v0.0.0-...-c8e9c26 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: LGPL-3.0 Imports: 10 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() (*Ledger, error)

func (*Ledger) AddBlock

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

func (*Ledger) AddHeaders

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

func (*Ledger) GetBlockByHash

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

func (*Ledger) GetBlockByHeight

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

func (*Ledger) GetBlockHash

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

func (*Ledger) GetBlockRootWithNewTxRoot

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

func (*Ledger) GetBookkeeperState

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

func (*Ledger) GetContractState

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

func (*Ledger) GetCurrentBlockHash

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

func (*Ledger) GetCurrentBlockHeight

func (this *Ledger) GetCurrentBlockHeight() uint32

func (*Ledger) GetCurrentHeaderHash

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

func (*Ledger) GetCurrentHeaderHeight

func (this *Ledger) GetCurrentHeaderHeight() uint32

func (*Ledger) GetCurrentStateRoot

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

func (*Ledger) GetEventNotifyByBlock

func (this *Ledger) GetEventNotifyByBlock(height uint32) ([]common.Uint256, error)

func (*Ledger) GetEventNotifyByTx

func (this *Ledger) GetEventNotifyByTx(tx common.Uint256) ([]*event.NotifyEventInfo, error)

func (*Ledger) GetHeaderByHash

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

func (*Ledger) GetHeaderByHeight

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

func (*Ledger) GetStorageItem

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

func (*Ledger) GetStore

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

func (*Ledger) GetTransaction

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

func (*Ledger) GetTransactionWithHeight

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

func (*Ledger) Init

func (this *Ledger) Init(defaultBookkeeper []keypair.PublicKey) error

func (*Ledger) IsContainBlock

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

func (*Ledger) IsContainTransaction

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

func (*Ledger) PreExecuteContract

func (this *Ledger) PreExecuteContract(tx *types.Transaction) ([]interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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