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)
//
GetDataFromDB([]byte) ([]byte, error)
//interface to reader block status
GetBlockHeight() uint32
GetBlockHash(uint32) (*crypto.HashType, error)
EternalBlock() *types.Block
}
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.