Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainReader ¶
type ChainReader interface {
// interface to read transactions
LoadBlockInfoByTxHash(crypto.HashType) (*types.Block, *types.Transaction, error)
ReadBlockFromDB(*crypto.HashType) (*types.Block, int, error)
GetEvmByHeight(msg types.Message, height uint32) (*vm.EVM, func() error, error)
GetLogs(from, to uint32, topicslist [][][]byte) ([]*types.Log, error)
FilterLogs(logs []*types.Log, topicslist [][][]byte) ([]*types.Log, error)
//
GetDataFromDB([]byte) ([]byte, error)
GetTxReceipt(*crypto.HashType) (*types.Receipt, error)
//interface to reader block status
GetBlockHeight() uint32
GetBlockHash(uint32) (*crypto.HashType, error)
EternalBlock() *types.Block
TailBlock() *types.Block
TailState() *state.StateDB
}
ChainReader defines basic operations blockchain exposes
type Server ¶
type Server interface {
// Run a server
Run() error
// Stop the service. It is blocked unitl the server is down.
Stop()
// Proc returns the goprocess of server is running
Proc() goprocess.Process
}
Server defines methods to start/stop a server
Click to show internal directories.
Click to hide internal directories.